Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java on GPU: Complete Method directly on GPUin plain Java

Tags:

java

gpu

Firstly: Is it possible to use Java and let it (partly) run on or use GPUs? And if it's possible, is it possible to use the normal Java syntax and not using special cuda or opencl syntax?

I want just take my coded java source and let it run with the smallest changes possible on GPUs.

I would greatly appreciate code samples.

like image 472
Andreas Hornig Avatar asked Jun 23 '11 21:06

Andreas Hornig


Video Answer


2 Answers

Consider Aparapi http://aparapi.github.io/. It attempts to convert bytecode to OpenCL at runtime. So you can code for your GPU in pure Java.

Full disclosure, I am the Aparapi lead developer.

like image 50
gfrost Avatar answered Sep 28 '22 05:09

gfrost


The Rootbeer GPU Compiler supports running arbitrary Java code on the GPU. It is more full featured than Aparapi. Rootbeer supports arbirary object graphs of any type.

It was just released open source on my github account: https://github.com/pcpratts/rootbeer1

like image 22
pcpratts Avatar answered Sep 28 '22 03:09

pcpratts