Discussions

News: GPGPU Java Programming

  1. GPGPU Java Programming (5 messages)

    In one of our previous posts we discussed the General Processing on the Graphics Processing Unit (GPGPU) concepts and architecture. For C/C++ programmers this is all great but for Java Programmers writing C/C++ instead of Java is to say the least an inconvenience. So what tools are out there for Java programmers? 

    Before we dive into coding some background. There are two competing GPGPU SDKs: OpenCL and CUDA. OpenCL is an open standard supported by all GPU vendors (namely AMD, NVIDIA and Intel), while CUDA is NVIDIA specific and will work only on NVIDIA cards. Both SDKs support C/C++ code which of course leaves us Java developers in the cold. So far there is no pure java OpenCL or CUDA support. This is not much help for the Java programmer who needs to take advantage of a GPUs massive parallelism potential unless she fiddles with Java Native interface. Of course there are some Java tools out there that ease the pain of GPGPU Java programming.

    Read the full article at :

    Java Code Geeks: GPGPU Java Programming

    Threaded Messages (5)

  2. GPGPU Java Programming[ Go to top ]

    We've tried GPGPU in Java with custom bindings.

    There's a reason it's not used widely - beacause it simply doesn't work well. Overhead of translating data between Java and OpenCL formats and going through the slow JNI eats a LOT of time.

    In the end, it's just better to rewrite everything in C++ where excelent tools like http://code.google.com/p/thrust/ can be used.

  3. I wrote this blog entry having in mind those who don't have the choice of starting from scratch.  In my experience re-writting thousand of lines of code executing critical applications is not always a wise choice. Another example where even starting from scratch in C/C++ is not a choice is in my company where we have invested in Java for about a decade now, so we have probably over a hunbdred java developers but very few with C/C++ skills.

    S.

  4. AMD's Aparapi[ Go to top ]

    AMD developed a framework for converting Java bytecode to compiled OpenCL code at runtime. They made it Open Source at http://code.google.com/p/aparapi/ I have not used the library myself but given AMD's hardware support of OpenCL I would imagine it has been tuned for peak performance.

  5. Since I wrote the blog entry I got a a couple of comments about other tools for java and OpenCL.  As having more experience with CUDA I was not aware of those tools, but now these comments got me interested on checking them out and making a comparison on them.  It seems that OpenCL has lots of good stuff for Java comparing to CUDA...

    Thanks!

  6. GPGPU Java Programming[ Go to top ]

    I've tried it for a couple of resource-intensive tasks. It's definitely better than our own OpenCL wrappers, but overhead of data marshalling is still too great compared to C++.