TornadoVM Reaches Version 1.0 |
Written by Nikos Vaggalis |
Monday, 01 January 2024 |
TornadoVM is a plug-in to OpenJDK that allows developers to automatically run Java programs on heterogeneous hardware. That means that TornadoVM allows you to run Java on GPU's, FPGAs and dedicated hardware in order to achieve massive gains in performance. Being able to run on such hardware opens the gates to running resource-hungry applications in Machine Learning, NLP or LLM. And computer graphics too. The gold standard of raytracing which until now was a sole privilege of C++, is now capable of running with Java too, courtesy of the TornadoVM showcasing the Java Ray Tracer project that is run on Intel HD Graphics and NVIDIA GPUs. Coding wise, TornadoVM allows developers to write code that can be easily offloaded to hardware accelerators without having to get deep into the underlaying computing architectures or heterogeneous parallel programming models. As a high level overview, TornadoVM provides the following features:
We had covered the project upon taking its baby steps steps in TornadoVM Makes It Possible To Run Java on GPUs and FPGAs under version 0.13. Now the project reaches the mileston version 1.0, going GA. This version comes with support for the JDK21 and the GraalVM 23.1.0 JIT Compiler, as well as the Truffle languages (the languages which interpreters are implemented with the Truffle framework of GraalVM) of Python, Ruby and Javascript. Version 1 also comes with custom off-heap data types taking advantage of JDK21's Panama Memory Segment API which enables native interop. Off-Heap memory refers to memory that is managed by the operating system and not the JVM, as such these types encapsulate a Memory Segment, that is, a contiguous region of memory outside the Java heap. Below is a list of the new types, with an arrow pointing from the on-heap primitive array types to their off-heap equivalent. int[ ] -> IntArray float[ ] -> FloatArray double[ ] -> DoubleArray long[ ] -> LongArray char[ ] -> CharArray short[ ] -> ShortArray byte [ ] -> ByteArray The existing Matrix and Vector collection types that TornadoVM offers (e. g. , VectorFloat, Matrix2DDouble, etc. ) have been refactored to use internally these off-heap data types instead of primitive arrays. Of course, when running an older TornadoVM version, to use the new off heap types you have some tweaking to do. There's detailed instructions provided by the official docs. These might have been the most important features added to the new version but there are others more minor too:
TornadoVM can be installed manually on a variety of platforms and is also available as Docker images. The project is open source and hosted on Github. The official docs are pretty detailed and easy to get started with. So there you have it. Java stepping into C++ and CUDA territories and another breakthrough for Java in 2023, on all fronts.
More InformationRelated ArticlesTornadoVM Makes It Possible To Run Java on GPUs and FPGAs The I Programmer Java 2023 Recap Program Deep Learning on the GPU with Triton
|
Last Updated ( Monday, 01 January 2024 ) |