TornadoVM is a GPU programming framework for Java that transparently JIT-compiles Java bytecode into NVIDIA CUDA PTX, OpenCL C, and Apple Metal (MSL) at runtime. Your existing Java code runs on NVIDIA GPUs, AMD GPUs, Intel GPUs, Apple Silicon, FPGAs, and multi-core CPUs — with no CUDA C, no JNI bindings, and no native toolchain in your application. It works with standard JDK 21 and JDK 25.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Deepak-Sangle/TornadoVM/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
Understand TornadoVM’s architecture, programming model, and supported hardware.
Installation
Install TornadoVM via SDKMAN!, from source, or with Maven/Gradle.
Quickstart
Write and run your first GPU-accelerated Java program in minutes.
API Reference
Full reference for TaskGraph, TornadoExecutionPlan, KernelContext, and more.
The Programming Model
TornadoVM offers two complementary styles that can be mixed in the sameTaskGraph:
Annotation API
Add
@Parallel to loop variables and @Reduce for reductions — TornadoVM infers the thread mapping automatically.Kernel API
Use
KernelContext for explicit global/local thread IDs, local memory, and barriers — the same model as CUDA and OpenCL.TaskGraph & Execution Plan
Chain tasks, control data transfers, and run on any device with
TaskGraph and TornadoExecutionPlan.Off-Heap Data Types
Use
FloatArray, IntArray, HalfFloatArray, and more for zero-copy device memory management.NVIDIA Ecosystem Integration
On NVIDIA hardware, TornadoVM goes beyond code generation — it integrates the entire CUDA software stack directly into theTaskGraph.
Hybrid API
Mix JIT-compiled Java kernels with cuBLAS, cuFFT, cuDNN, and CUTLASS library calls in one graph.
cuBLAS
SGEMM, SGEMV, FP16 Tensor Core GemmEx, and fused epilogues from pure Java.
cuFFT
1D and 2D complex/real FFT transforms with automatic plan caching.
CUDA Graphs
Capture entire pipelines into CUDA Graphs for single-launch replay.
Supported Backends
CUDA Backend
Java → Graal IR → CUDA PTX → NVRTC → cubin. Full NVIDIA library ecosystem access.
OpenCL Backend
Targets NVIDIA, AMD, Intel GPUs, integrated GPUs, multi-core CPUs, and FPGAs.
Apple Metal Backend
Native Metal Shading Language (MSL) generation for Apple Silicon M1–M4.
Multi-Device
Distribute tasks across multiple devices and migrate them dynamically at runtime.
Get Started in 3 Steps
Run your first accelerated program
Add TornadoVM to Your Project
pom.xml
The Tornado-API module is licensed under Apache 2.0. The runtime and drivers use GPLv2 with Classpath Exception — the same license as OpenJDK — which does not impose copyleft obligations on your application.