There was a time when running a program on an array of processors meant that you worked in some high-powered lab somewhere. Now your computer probably has plenty of processors hiding in its GPU and if you have an FPGA, you have everything you need to make something custom. The idea behind TornadoVM is to modify OpenJDK and GraalVM to support running some Java code on parallel architectures supported by OpenCL. The system can utilize multi-core CPUs, GPUs (NVIDIA and AMD), Intel integrated GPUs, and Intel FPGAs.
If you want to try your hand at accelerated Java, there are some docker containers to get you started fast. There’ are also quite a few examples, such as a computer vision application.
There are some easier examples, such as this one that uses an FPGA. You can see the use of the @Parallel inside for loops and some basic task management. If you prefer, you can start with the simple hello world example.
There are several articles and papers about TornadoVM, some of which are behind paywalls. However, we enjoyed this article which has a good blend of theory and practice.
Java isn’t always the first choice for high-performance computing and we have to wonder how this would benchmark against someone using OpenCL in a more traditional language. On the other hand, if you know Java this might be a great way to get started with parallel processing.
via Hack a Day https://hackaday.com
March 12, 2020 at 11:05AM