General-purpose computing on graphics processing units (GPGPU) is a very attractive concept to harness the power of the GPU for any kind of computing.
I'd love to use GPGPU for image processing, particles, and fast geometric operations.
Right now, it seems the two contenders in this space are CUDA and OpenCL. I'd like to know:
Any real-world experience/examples/war stories are appreciated.
Generally if the app of your choice supports both CUDA and OpenCL, going with CUDA is the best option as it generates better performance results in this scenario. This is because NVIDIA provides top quality support.
CUDA's kernel execution was also consistently faster than OpenCL's, despite the two implementations running nearly identical code. CUDA seems to be a better choice for applications where achieving as high a performance as possible is important.
As we have already stated, the main difference between CUDA and OpenCL is that CUDA is a proprietary framework created by Nvidia and OpenCL is open source. Each of these approaches brings their own pros and cons which we will highlight in this section.
Although there are many applications where GPUs can bring some game-changing benefits, you might say there are still some obstacles. However, Java and GPUs can do great things together.
AFAIK, JavaCL / OpenCL4Java is the only OpenCL binding that is available on all platforms right now (including MacOS X, FreeBSD, Linux, Windows, Solaris, all in Intel 32, 64 bits and ppc variants, thanks to its use of JNA).
It has demos that actually run fine from Java Web Start at least on Mac and Windows (to avoid random crashes on Linux, please see this wiki page, such as this Particles Demo.
It also comes with a few utilities (GPGPU random number generation, basic parallel reduction, linear algebra) and a Scala DSL.
Finally, it's the oldest bindings available (since june 2009) and it has an active user community.
(Disclaimer: I'm JavaCL's author :-))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With