Questions tagged [aparapi]

Aparapi is a Java API that allows developers to leverage a GPU by dynamically converting Java bytecode to OpenCL at runtime.

Aparapi allows developers to write native Java code capable of being executed directly on a graphics card GPU by converting Java byte code to an OpenCL kernel dynamically at runtime. It is Open-source under the Apache License, version 2. Because it is backed by OpenCL Aparapi is compatible with all OpenCL compatible Graphics Cards.

Originally a project conceived and developed by AMD corporation. It was later abandoned by AMD and sat mostly idle for several years. Despite this there were some failed efforts by the community to keep the project alive, but without a clear community leader no new releases ever came. Eventually the project was resurrected and has been active since 2016. Since then the project has had several releases a year.

More information:

40 questions
1
vote
2 answers

Aparapi cannot resolve max and falls back to CPU

So I'm designing a CNN in Java and I'm down to the point where I really wanna parallelize the convolution and pooling. This is my approach(rows, columns, inputLayer, convLayer, poolLayer and features have been initialized already in the…
1
vote
1 answer

Java Benchmarking addition of arrays with both CPU and GPU and compare performance

I am trying to compare a simple addition task with both CPU and GPU, but the results that I get are so weird. First of all, let me explain how I managed to run the GPU task. Let's dive into code now this is my code it simply package gpu; import…
Mixalis Navridis
  • 181
  • 2
  • 15
1
vote
0 answers

Can Aparapi Kernels call static methods from run?

Question and Essential Details I'm experimenting with Aparapi and I wanted to write a utility class to handle common operations; e.g. public final class GPUUtils { public static void add(final double[] sum, final double[] a, final double[]…
Ryan Moser
  • 123
  • 1
  • 12
1
vote
1 answer

Is there a way to get 32 bit (float) values out of Math.sin() or a similar class, maybe smth like Math.sin(float a)

I am experimenting with using my GPU in java, I am using Aparapi but I have an issue where if I use (float)Math.sin(x) it still falls back to the CPU because my GPU doesn't support F64. is there a Math library for floats? should I be using the gpu…
mcbabuka
  • 13
  • 3
1
vote
0 answers

Why would an Aparapi Kernel running on a AMD GPU allow very large @Local arrays, but not with Nvidia?

I have a Java program that needs access to a large array from the GPU's local memory. I can declare and access a large array with a '@Local float[] mem = new float[1000000];' using Aparapi on a laptop with an AMD Radeon GPU and it works just fine,…
M. Gianota
  • 184
  • 8
1
vote
1 answer

OpenCL compile failed aparapi

Does anyone know what this means and how this could've happened? It looks right to me. I'm trying to use the GPU for a neural network. This is the error: !!!!!!! clCreateCommandQueue() failed out of host memory May 28, 2018 6:36:39 PM…
dan dan
  • 475
  • 1
  • 3
  • 12
1
vote
0 answers

Aparapi buffer values not copied

I get the following problem on OpenCL platform (running on Intel HD 4000), when i fill buffer inside kernel with values buf[getGlobalId()] = getGlobalId() some of the values are not copied back from Device to host. Instead of [0, 1,2,3,4...]…
user36605
  • 11
  • 2
1
vote
1 answer

Plain Java Thread Pool vs. Aparapi GPU for complex objects

I am evaluating whether to use a Java Thread Pool with a quad-core processor or the Aparapi GPU framework for my program. Whereas the gain on a GPU would be nice, the speed difference between a quad-core processor and a GPU is not a knock out…
madison54
  • 743
  • 2
  • 8
  • 19
1
vote
2 answers

Can Aparapi handle string processing with Java 8?

I'm learning to use Aparapi with Java 8 so GPU can be used to speed up my apps, but I wonder if Aparapi can handle string processing. For instance, if I have 10,000 files to go through and my app needs to read in the text and go through each line to…
Frank
  • 30,590
  • 58
  • 161
  • 244
1
vote
2 answers

Java/Open CL/Aparapi: What to kind of performance to expect from which device?

In order to get a rough feeling for how much openCl is going to help me, I ran a test of matrix-matrix multiplication as this kind of basic linear algebra will be my primary use. The code I used can be found here:…
John Smith
  • 704
  • 7
  • 19
1
vote
1 answer

OpenCL Index operations: algorithmic vs constant index buffer

So I'm writing a neural network library using Aparapi (which generates OpenCL from Java code). Anyway there are many situations where I need to do complex index operations to find the source/destination node for a given weight when doing forward…
1
vote
1 answer

Aparapi class to convert byte code into OpenCL kernel

I'm using Aparapi to program OpenCL from Java. However I can't find which Aparapi class converts Java byte code into OpenCL kernels. Can you point me at it please?
1
vote
1 answer

Calculating Pi Using Float or Integer Arrays

I'm using Aparapi to do number crunching inside my Java program on the GPU. From what I understand, Aparapi plays nice with float arrays. I want to compute Pi to the Nth decimal using Aparapi. I'm thinking of using the Leibniz method, but I'm not…
K. Barresi
  • 1,275
  • 1
  • 21
  • 46
1
vote
1 answer

Parallelize do...while using OpenCL

The Principle I know, such a simple calculation wouldn't be worth to get parallized elaborately. It's such an example and the mathematical operation is just a placeholder for some more interesting computations. [Pseudo code] var id = 0, do { id…
fridojet
  • 1,276
  • 3
  • 15
  • 29
0
votes
0 answers

Unable to make field accessable, unable to open to. Aparapi

trying to use Aparapi, using Maven as a build manager and Intellij as my IDE. my Laptop does not have a GPU installed, but from what I understand, Aparapi will use a ThreadPool instead of a GPU. From what i understand as well, Aparapi converts to…