TornadoVM ships as a prebuilt SDK that you can install in under two minutes with SDKMAN!, as a source build for contributors who need to modify the runtime or backends, and as a Maven Central artifact for teams that want GPU acceleration inside an existing Java project without installing the full SDK. Choose the path that fits your workflow — all three routes land at the same API.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.
Prerequisites
Before installing, make sure the following are in place on your system.JDK 21 or JDK 25
JAVA_HOME must point to a JDK 21 (or JDK 25) installation. GraalVM based on JDK 21 also works. Run java -version to confirm.GCC / G++ ≥ 13
The native driver libraries are compiled at install time. GCC/G++ version 13 or later is required on Linux. On macOS, Xcode Command Line Tools satisfy this requirement.
GPU Drivers
Install the vendor driver that matches your target backend: the OpenCL runtime (AMD/Intel), the NVIDIA CUDA Toolkit, or macOS (Metal is built in). Without a driver, TornadoVM falls back to a CPU OpenCL device.
CUDA Toolkit (NVIDIA only)
For the CUDA backend and NVIDIA library tasks (cuBLAS, cuFFT, cuDNN), install the CUDA Toolkit and ensure
/usr/local/cuda or $CUDA_PATH is set. NVRTC must be present.Method 1: SDKMAN! (Recommended)
SDKMAN! is the fastest way to install TornadoVM. It handles the JDK, setsTORNADOVM_HOME, and configures your shell automatically.
Choose a backend variant and install
The default install picks the latest release with the OpenCL backend. Use a versioned variant to select a specific backend:
| Variant | Targets | Notes |
|---|---|---|
5.2.0-opencl | NVIDIA, AMD, Intel GPUs; multi-core CPUs | Default — broadest hardware support |
5.2.0-cuda | NVIDIA GPUs (PTX, Tensor Cores, cuBLAS/cuFFT/cuDNN) | Requires CUDA Toolkit + NVRTC |
5.2.0-metal | Apple Silicon M1–M4 | macOS only; no extra install needed |
5.2.0-full | All of the above | Largest download; covers every backend |
Method 2: Build From Source
Building from source is recommended for contributors, users who need the latestdevelop branch, or anyone who wants a custom backend combination. The installer script handles downloading a JDK, building all Maven modules, and compiling the native driver libraries.
- Linux / macOS
- Windows
Run the installer script
The
tornadovm-installer script accepts a --jdk keyword and one or more --backend values. Run --listJDKs to see all supported JDK keywords.Source the environment
After the build completes, the installer prints a
source command. Run it (or add it to your shell profile):On macOS, set
MACOSX_DEPLOYMENT_TARGET before building if you need the SDK to run on older macOS versions:Available Installer Flags
| Flag | Description |
|---|---|
--jdk <keyword> | JDK to download and use (e.g., jdk21, graal-jdk-21). Run --listJDKs to list all. |
--backend <name> | Backend(s) to build: opencl, cuda, metal, or comma-separated combinations. |
--auto-deps | Automatically download any missing build dependencies. |
--mvn_single_threaded | Run Maven in single-threaded mode (useful on low-RAM machines). |
--polyglot | Enable Truffle interoperability with GraalVM. |
--listJDKs | Print all supported JDK keywords and exit. |
Build the CUDA backend on its own — do not combine it with OpenCL in the same build if you intend to run the unit-test suite. With both backends active, tests may silently run on the OpenCL device and report false positives.
Method 3: Maven Dependency
If you only want to write TornadoVM-accelerated code (not run the SDK launcher), add the API and runtime artifacts to yourpom.xml. The artifact version suffix must match the JDK you run on.
Adding the Maven dependency gives you the API and runtime JARs but does not install the native driver libraries. You still need a TornadoVM SDK installation (SDKMAN! or source build) on the machine where the application executes, so the JVM can load the native backends at runtime.
Verifying the Installation
Run the following command to list every GPU and CPU device that TornadoVM has discovered:<driverNumber>:<deviceNumber> pair. Example output on a machine with an NVIDIA GPU and an Intel integrated GPU:
<taskGraphName>.<taskName>.device format:
Backend-Specific Notes
CUDA Backend
CUDA Backend
- Requires the NVIDIA CUDA Toolkit (including NVRTC). Install from developer.nvidia.com/cuda-downloads.
- Ensure
/usr/local/cudaexists or$CUDA_PATHis set before building or running. - For cuBLAS, cuFFT, and cuDNN library tasks, the corresponding CUDA libraries must be installed (they are included in most CUDA Toolkit bundles).
- Build the CUDA backend in isolation when running unit tests to avoid false positives from mixed-backend test execution.
OpenCL Backend
OpenCL Backend
- On NVIDIA, the OpenCL runtime is bundled with the CUDA Toolkit; no extra install needed.
- On AMD, install the ROCm OpenCL runtime or the AMDGPU-PRO driver stack.
- On Intel, install the Intel oneAPI Base Toolkit or the Intel OpenCL runtime.
- On Linux CPU, the POCL (Portable Computing Language) runtime provides a software OpenCL device if no GPU driver is present.
Metal Backend (macOS)
Metal Backend (macOS)
- Metal is built into macOS — no additional driver install is required.
- Supported on Apple Silicon M1, M2, M3, and M4 chips.
- Requires macOS 11 (Big Sur) or later.
- When building from source, set
MACOSX_DEPLOYMENT_TARGET=11.0if the SDK needs to run on macOS 11 targets. - The Metal backend was introduced in TornadoVM 5.2.0.