beehive-lab/TornadoVM
Write Java. Run on GPUs. Fast.
What it solves
TornadoVM allows Java developers to run computationally intensive tasks on GPUs and multi-core CPUs without needing to write native C/C++ or CUDA code. It removes the complexity of managing JNI bindings and native toolchains, enabling high-performance computing (HPC) and AI workloads to be executed directly from the JVM.
How it works
It JIT-compiles Java bytecode into target-specific languages like NVIDIA CUDA, OpenCL C, and Apple Metal (MSL) at runtime. It provides three levels of API control:
- Loop Parallel API: Uses
@Parallelannotations to automatically infer thread mapping. - KernelContext API: Provides explicit thread indexing similar to CUDA/OpenCL for fine-grained control.
- TileContext API: A specialized CUDA path that allows programming in tiles rather than threads, utilizing the tile compiler to optimize tensor-core instructions.
On NVIDIA hardware, it integrates directly with the NVIDIA library ecosystem (cuBLAS, cuFFT, cuDNN, cuDF) and exposes Tensor Core mma.sync intrinsics, allowing these native calls to share device buffers within a single TaskGraph.
Who it’s for
Java developers who need to accelerate machine learning, deep learning, computer vision, physics simulations, or financial applications using GPUs (NVIDIA, AMD, Intel, Apple Silicon) and multi-core CPUs.
Highlights
- Multi-Backend Support: Works across NVIDIA (CUDA), AMD, Intel, and Apple Silicon (Metal) GPUs.
- Native NVIDIA Integration: Direct access to cuBLAS, cuFFT, cuDNN, and cuDF without JNI bindings.
- Tensor Core Access: Exposes
mma.syncinstructions and Tile Programming via the TileContext API. - CUDA Graph Support: Records and replays execution plans as a single CUDA Graph to reduce launch overhead.
- JVM Compatibility: Plugs into existing OpenJDK or GraalVM installations without replacing the JVM.
Related
- Project
- Project
- Project
- Project
- Dispatch