VibeBuilders.ai Logo
VibeBuilders.ai
TornadoVM

TornadoVM

beehive-lab
March 28, 2025
github

TornadoVM

TornadoVM version Contributor Covenant License: Apache 2 License: GPL v2

TornadoVM is a plug-in to OpenJDK and GraalVM that allows programmers to automatically run Java programs on heterogeneous hardware. TornadoVM targets OpenCL, PTX and SPIR-V compatible devices which include multi-core CPUs, dedicated GPUs (Intel, NVIDIA, AMD), integrated GPUs (Intel HD Graphics and ARM Mali), and FPGAs (Intel and Xilinx).

TornadoVM has three backends that generate OpenCL C, NVIDIA CUDA PTX assembly, and SPIR-V binary. Developers can choose which backends to install and run.


Website: tornadovm.org

Documentation: https://tornadovm.readthedocs.io/en/latest/

For a quick introduction please read the following FAQ.

Latest Release: TornadoVM 1.0.10 - 31/01/2025 : See CHANGELOG.


1. Installation

In Linux and macOS, TornadoVM can be installed automatically with the installation script. For example:

$ ./bin/tornadovm-installer
usage: tornadovm-installer [-h] [--version] [--jdk JDK] [--backend BACKEND] [--listJDKs] [--javaHome JAVAHOME]

TornadoVM Installer Tool. It will install all software dependencies except the GPU/FPGA drivers

optional arguments:
  -h, --help           show this help message and exit
  --version            Print version of TornadoVM
  --jdk JDK            Select one of the supported JDKs. Use --listJDKs option to see all supported ones.
  --backend BACKEND    Select the backend to install: { opencl, ptx, spirv }
  --listJDKs           List all JDK supported versions
  --javaHome JAVAHOME  Use a JDK from a user directory

NOTE Select the desired backend:

  • opencl: Enables the OpenCL backend (requires OpenCL drivers)
  • ptx: Enables the PTX backend (requires NVIDIA CUDA drivers)
  • spirv: Enables the SPIRV backend (requires Intel Level Zero drivers)

Example of installation:

# Install the OpenCL backend with OpenJDK 21
$ ./bin/tornadovm-installer --jdk jdk21 --backend opencl

# It is also possible to combine different backends:
$ ./bin/tornadovm-installer --jdk jdk21 --backend opencl,spirv,ptx

Alternatively, TornadoVM can be installed either manually from source or by using Docker.

If you are planning to use Docker with TornadoVM on GPUs, you can also follow these guidelines.

You can also run TornadoVM on Amazon AWS CPUs, GPUs, and FPGAs following the instructions here.

2. Usage Instructions

TornadoVM is currently being used to accelerate machine learning and deep learning applications, computer vision, physics simulations, financial applications, computational photography, and signal processing.

Featured use-cases:

  • kfusion-tornadovm: Java application for accelerating a computer-vision application using the Tornado-APIs to run on discrete and integrated GPUs.
  • Java Ray-Tracer: Java application accelerated with TornadoVM for real-time ray-tracing.

We also have a set of examples that includes NBody, DFT, KMeans computation and matrix computations.

Additional Information

3. Programming Model

TornadoVM exposes to the programmer task-level, data-level and pipeline-level parallelism via a light Application Programming Interface (API). In addition, TornadoVM uses single-source property, in which the code to be accelerated and the host code live in the same Java program.

Compute-kernels in TornadoVM can be programmed using two different approaches (APIs):

a) Loop Parallel API

Compute kernels are written in a sequential form (tasks programmed for a single thread execution). To express parallelism, TornadoVM exposes two annotations that can be used in loops and parameters: a) @Parallel for annotating parallel loops; and b) @Reduce for annotating parameters used in reductions.

The following code snippet shows a full example to accelerate Matrix-Multiplication using TornadoVM and the loop-parallel API:

public class Compute {
    private static void mxmLoop(Matrix2DFloat A, Matrix2DFloat B, Matrix2DFloat C, final int size) {
        for (@Parallel int i = 0; i 
    
        universityOfManchester-graal
        https://raw.githubusercontent.com/beehive-lab/tornado/maven-tornadovm

    tornado
    tornado-api
    1.0.10

    tornado
    tornado-matrices
    1.0.10

To run TornadoVM, you need to either install the TornadoVM extension for GraalVM/OpenJDK, or run with our Docker images.

6. Additional Resources

Here you can find videos, presentations, tech-articles and artefacts describing TornadoVM, and how to use it.

7. Academic Publications

If you are using TornadoVM >= 0.2 (which includes the Dynamic Reconfiguration, the initial FPGA support and CPU/GPU reductions), please use the following citation:

@inproceedings{Fumero:DARHH:VEE:2019,
 author = {Fumero, Juan and Papadimitriou, Michail and Zakkak, Foivos S. and Xekalaki, Maria and Clarkson, James and Kotselidis, Christos},
 title = {{Dynamic Application Reconfiguration on Heterogeneous Hardware.}},
 booktitle = {Proceedings of the 15th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments},
 series = {VEE '19},
 year = {2019},
 doi = {10.1145/3313808.3313819},
 publisher = {Association for Computing Machinery}
}

If you are using Tornado 0.1 (Initial release), please use the following citation in your work.

@inproceedings{Clarkson:2018:EHH:3237009.3237016,
 author = {Clarkson, James and Fumero, Juan and Papadimitriou, Michail and Zakkak, Foivos S. and Xekalaki, Maria and Kotselidis, Christos and Luj\'{a}n, Mikel},
 title = {{Exploiting High-performance Heterogeneous Hardware for Java Programs Using Graal}},
 booktitle = {Proceedings of the 15th International Conference on Managed Languages \& Runtimes},
 series = {ManLang '18},
 year = {2018},
 isbn = {978-1-4503-6424-9},
 location = {Linz, Austria},
 pages = {4:1--4:13},
 articleno = {4},
 numpages = {13},
 url = {http://doi.acm.org/10.1145/3237009.3237016},
 doi = {10.1145/3237009.3237016},
 acmid = {3237016},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {Java, graal, heterogeneous hardware, openCL, virtual machine},
}

Selected publications can be found here.

8. Acknowledgments

This work is partially funded by Intel corporation. In addition, it has been supported by the following EU & UKRI grants (most recent first):

Furthermore, TornadoVM has been supported by the following EPSRC grants:

9. Contributions and Collaborations

We welcome collaborations! Please see how to contribute to the project in the CONTRIBUTING page.

Write your questions and proposals:

Additionally, you can open new proposals on the GitHub discussions page.

Alternatively, you can share a Google document with us.

Collaborations:

For Academic & Industry collaborations, please contact here.

10. TornadoVM Team

Visit our website to meet the team.

11. Licenses Per Module

To use TornadoVM, you can link the TornadoVM API to your application which is under Apache 2.

Each Java TornadoVM module is licensed as follows:

| Module | License | |--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Tornado-API | License: Apache 2 | | Tornado-Runtime | License: GPL v2 | | Tornado-Assembly | License: Apache 2 | | Tornado-Drivers | License: GPL v2 | | Tornado-Drivers-OpenCL-Headers | License | | Tornado-scripts | License: Apache 2 | | Tornado-Annotation | License: Apache 2 | | Tornado-Unittests | License: Apache 2 | | Tornado-Benchmarks | License: Apache 2 | | Tornado-Examples | License: Apache 2 | | Tornado-Matrices | License: Apache 2 | | | |

Vibe Score

LLM Vibe Score

0.539

Sentiment

Human Vibe Score

0.20972324263626374

Rate this Resource

Join the VibeBuilders.ai Newsletter

The newsletter helps digital entrepreneurs how to harness AI to build your own assets for your funnel & ecosystem without bloating your subscription costs.

Start the free 5-day AI Captain's Command Line Bootcamp when you sign up:

By subscribing, you agree to our Privacy Policy and Terms of Service.