[ACCEPTED]-Java on GPU: Complete Method directly on GPUin plain Java-gpu
Consider Aparapi http://aparapi.github.io/. It attempts to convert 3 bytecode to OpenCL at runtime. So you can 2 code for your GPU in pure Java.
Full disclosure, I 1 am the Aparapi lead developer.
The Rootbeer GPU Compiler supports running 4 arbitrary Java code on the GPU. It is more 3 full featured than Aparapi. Rootbeer supports 2 arbirary object graphs of any type.
It was 1 just released open source on my github account: https://github.com/pcpratts/rootbeer1
There are several Java bindings to CUDA 17 and OpenCL (jcuda.org, jocl.org, something else also called 16 jocl) but these are all just ways to get CUDA 15 or OpenCL code running on the GPU via Java 14 and require you to write your code specifically 13 for that. I don't think there is an easy 12 way to run an arbitrary multi-threaded Java 11 program on the GPU with just minor changes 10 to the code.
What does your Java program 9 do that you want to run on the GPU?
You have 8 to take into account that the architecture 7 of a GPU is quite different than that of 6 a CPU; cores on a GPU are not general-purpose 5 cores that can do anything and work independently, as 4 in an Intel x86 CPU. To really take advantage 3 of the specific SIMD architecture of a GPU, your 2 code has to be written with that architecture 1 in mind.
TornadoVM is a plug-in to OpenJDK that allows 6 programmers to automatically run Java programs 5 on heterogeneous hardware. TornadoVM currently 4 targets OpenCL-compatible devices and it 3 runs on multi-core CPUs, GPUs (NVIDIA and 2 AMD), Intel integrated GPUs, and Intel FPGAs. Take 1 a look here: https://github.com/beehive-lab/TornadoVM
Have a look on http://code.google.com/p/java-gpu/.
It compiles pure java code 1 into kernels, with only using annotations.
More Related questions