bit-tech.net

Rootbeer brings GPGPU integration to Java

Rootbeer brings GPGPU integration to Java

The Rootbeer compiler allows Java programmers to rapidly take advantage of the performance benefits from GPGPU computing.

Phil Pratt-Szeliga, an instructor at Syracuse University, has released the source code for the Rootbeer compiler - a tool he and colleagues Jim Fawcett and Roy Welch claim makes it significantly easier to write code for execution on a graphics processor.

The benefits of running highly parallel code on a graphics processor - which typically has hundreds or thousands of cores, compared to a CPU's half-dozen - are well known. Projects including DirectCompute, OpenCL and CUDA all aim to allow coders to port the parallel portions of their programs to GPUs - but Pratt-Szeliga claims they don't make it easy.

'When converting a serial program to a parallel program that can run on a graphics processing unit, the developer must choose what functions will run on the GPU' explains Pratt-Szeliga. 'For each function the developer chooses, he or she needs to manually write code to: serialise state to GPU memory; define the kernel code that the GPU will execute; control the kernel launch; and deserialise state back to CPU memory.'

Seeing that as far too many steps, Pratt-Szeliga developed Rootbeer, a compiler which allows programmers to access the power of the GPU directly within Java. 'Rootbeer [...] allows developers to simply write code in Java and the (de)serialisation, kernel code generation and kernel launch is done automatically,' Pratt-Szeliga explains. 'This is in contrast to Java language bindings for CUDA or OpenCL, where the developer still has to do these things manually.'

The Rootbeer compiler supports all the standard Java features, with the exception of dynamic method invocation, reflection and native methods. Despite these restrictions, it promises much: in testing, Pratt-Szeliga and his team developed three performance example applications with the best demonstrating a 100x performance boost compared to CPU-based execution; the worst, admittedly, slowed down by 3x compared to its original version.

While Rootbeer certainly isn't suitable for every case, it's a remarkable attempt to bring the benefits of GPGPU computing to additional program types - and for those, like the best-performing test case, that are suited to parallel execution, promises significant performance gains for a very small investment of time and effort.

The full source code for Rootbeer can be downloaded from GitHub, along with a copy of the team's paper on the subject from the 14th IEEE International Conference on High Performance Computing.

7 Comments

Discuss in the forums Reply
Bloody_Pete 13th August 2012, 12:24 Quote
Maybe Minecraft will finally run ok now!
Crunch77 13th August 2012, 20:12 Quote
Nice.
One of the more interesting bit of news lately. :)
Griffter 14th August 2012, 10:18 Quote
can someone explain to a normal guy what does this mean :-)? now can games look better lol ? (less code, faster rendering)
OWNED66 14th August 2012, 13:42 Quote
Quote:
Originally Posted by Bloody_Pete
Maybe Minecraft will finally run ok now!

u can use opengl on monecraft
OWNED66 14th August 2012, 13:42 Quote
Quote:
Originally Posted by Griffter
can someone explain to a normal guy what does this mean :-)? now can games look better lol ? (less code, faster rendering)

java will stop hogging cpu cycles
faugusztin 14th August 2012, 13:51 Quote
Quote:
Originally Posted by Griffter
can someone explain to a normal guy what does this mean :-)? now can games look better lol ? (less code, faster rendering)

It means that Java applications can use those CUDA Cores/Stream processors to do some math on the graphics card instead of CPU. And because graphics card are a little bit (ok, a lot) quicker at some math, it is a good thing to have if you do lots of math in your application.

For you as a normal guy ? Absolutely nothing.
lurker2b 14th August 2012, 15:49 Quote
unless you bruteforce hashed passwords in java
Log in

You are not logged in, please login with your forum account below. If you don't already have an account please register to start contributing.



Discuss in the forums