An open API service indexing awesome lists of open source software.

https://github.com/beehive-lab/tornadovm

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://github.com/beehive-lab/tornadovm

ai cuda gpu-acceleration gpu-computing gpus graalvm java levelzero multi-core opencl parallel-computing parallel-programming spirv

Last synced: 3 days ago
JSON representation

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages

Awesome Lists containing this project

README

          

# TornadoVM
[![Build on [push]](https://github.com/beehive-lab/TornadoVM/actions/workflows/fast-test.yml/badge.svg)](https://github.com/beehive-lab/TornadoVM/actions/workflows/fast-test.yml)

[![API Version](https://img.shields.io/maven-central/v/io.github.beehive-lab/tornado-api?logo=apache-maven&color=blue&label=Tornado%20API)](https://central.sonatype.com/artifact/io.github.beehive-lab/tornado-api)
[![Runtime Version](https://img.shields.io/maven-central/v/io.github.beehive-lab/tornado-runtime?logo=apache-maven&color=blue&label=Tornado%20Runtime)](https://central.sonatype.com/artifact/io.github.beehive-lab/tornado-runtime)
[![SDKMAN!](https://img.shields.io/badge/Install%20with-SDKMAN!-2c7a7b?logo=sdkman&logoColor=white)](https://sdkman.io/sdks/tornadovm/)

![TornadoVM version](https://img.shields.io/badge/version-3.0.0-purple) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-1.4-4baaaa.svg)](CODE_OF_CONDUCT.md) [![License: Apache 2](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://github.com/beehive-lab/TornadoVM/blob/master/LICENSE_APACHE2) ![License: GPL v2](https://img.shields.io/badge/License-GPL%20V2%20Classpath%20Exception-blue.svg)

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](https://www.tornadovm.org)

**Documentation**: [https://tornadovm.readthedocs.io/en/latest/](https://tornadovm.readthedocs.io/en/latest/)

For a quick introduction please read the following [FAQ](https://tornadovm.readthedocs.io/en/latest/).

**Latest Release:** TornadoVM 3.0.0 - 24/02/2026 :
See [CHANGELOG](https://tornadovm.readthedocs.io/en/latest/CHANGELOG.html).

----------------------

## 1. Quick Start - Install & Use the TornadoVM SDK

### Prerequisites
- **JDK 21** (or GraalVM based on JDK 21)
- GCC/G++ >= 13.0
- C toolchain / build tools (for native parts, depending on backend)
- OpenCL Headers, CUDA Toolkit

**Note:** Make sure `JAVA_HOME` points to your JDK/GraalVM 21 installation.

### Install TornadoVM (via SDKMAN!)

TornadoVM is distributed through our [**official website**](https://www.tornadovm.org/downloads) and **SDKMAN!**. Install a version that matches your OS, architecture, and accelerator backend.

All TornadoVM SDKs are available on the [SDKMAN! TornadoVM page](https://sdkman.io/sdks/tornadovm/).

You can choose a backend-specific build:

Backend | SDKMAN! Latest Version
--------- | --------------
OpenCL | `2.2.0-opencl` **(default)**
PTX | `2.2.0-ptx`
SPIR-V | `2.2.0-spirv`
All Backends | `2.2.0-full`

Install **TornadoVM**:
```bash
sdk install tornadovm
```

### Verify Available Devices
Check that TornadoVM can detect your CPU/GPU accelerators and that all required drivers are installed:
```bash
tornado --devices
```
This command lists all supported devices available on your system.

### Optional: Containers and Cloud
If you are planning to use Docker with TornadoVM on GPUs, you can also
follow [these](https://github.com/beehive-lab/docker-tornado#docker-for-tornadovm) guidelines.

You can also run TornadoVM on Amazon AWS CPUs, GPUs, and FPGAs following the
instructions [here](https://tornadovm.readthedocs.io/en/latest/cloud.html).

## 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:

- [GPULlama3.java](https://github.com/beehive-lab/GPULlama3.java): GPU-accelerated Llama3.java inference in pure Java using TornadoVM.
- [kfusion-tornadovm](https://github.com/beehive-lab/kfusion-tornadovm): Java application for accelerating a
computer-vision application using the Tornado-APIs to run on discrete and integrated GPUs.
- [Java Ray-Tracer](https://github.com/Vinhixus/TornadoVM-Ray-Tracer): Java application accelerated with TornadoVM for
real-time ray-tracing.

### Run your First TornadoVM Program
You can run a Matrix-Vector example by adapting the classpath to point to your TornadoVM version:

#### Unix (Linux/macOS)
```bash
java @$TORNADOVM_HOME/tornado-argfile -cp $TORNADOVM_HOME/share/java/tornado/tornado-examples-2.2.0.jar uk.ac.manchester.tornado.examples.compute.MatrixVectorRowMajor
```

#### Windows (10+)
```bash
java @%TORNADOVM_HOME%\tornado-argfile -cp %TORNADOVM_HOME%\share\java\tornado\tornado-examples-2.2.0.jar uk.ac.manchester.tornado.examples.compute.MatrixVectorRowMajor
```

We also have a set
of [examples](https://github.com/beehive-lab/TornadoVM/tree/master/tornado-examples/src/main/java/uk/ac/manchester/tornado/examples)
that includes NBody, DFT, KMeans computation and matrix computations.

**Additional Information**

- [General Documentation](https://tornadovm.readthedocs.io/en/latest/introduction.html)
- [Benchmarks](https://tornadovm.readthedocs.io/en/latest/benchmarking.html)
- [How TornadoVM executes reductions](https://tornadovm.readthedocs.io/en/latest/programming.html#parallel-reductions)
- [Execution Flags](https://tornadovm.readthedocs.io/en/latest/flags.html)
- [FPGA execution](https://tornadovm.readthedocs.io/en/latest/fpga-programming.html)
- [Profiler Usage](https://tornadovm.readthedocs.io/en/latest/profiler.html)

## 3. Use TornadoVM in Your Project (Maven)

```xml


io.github.beehive-lab
tornado-api
3.0.0


io.github.beehive-lab
tornado-runtime
3.0.0

```

## 4. Programming Model

TornadoVM offers two complementary ways to express parallelism:

### Loop Parallel API
Use Java annotations such as `@Parallel` and `@Reduce` to parallelize loops.

### Kernel API
Use `KernelContext` for explicit GPU-style programming (thread IDs, local memory, barriers), similar to CUDA/OpenCL/SYCL.

Both models can be combined inside a `TaskGraph`.

Read more in our [documentation](https://tornadovm.readthedocs.io/en/latest/programming.html).

## 5. Contributing to TornadoVM

We welcome contributions from the community — bug reports, documentation improvements, new features, and backends.

### Building From Source
For contributors and developers, full build instructions are in:

👉 [INSTALL_FROM_SOURCE.md](INSTALL_FROM_SOURCE.md)

### How to Contribute
- Read the [CONTRIBUTING](CONTRIBUTING.md) page.
- Write your questions in [GitHub discussions](https://github.com/beehive-lab/TornadoVM/discussions) or in the TornadoVM [Slack community](https://join.slack.com/t/tornadovmcommunity/shared_invite/zt-3ai2wyqva-bKz~cQRFlaJ~ZnPrbkwIEw).
- Share your proposals with us in [GitHub discussions](https://github.com/beehive-lab/TornadoVM/discussions) or as a Google document.
- Submit pull requests — all contributions are welcome.

### Collaborations:

For Academic & Industrial collaborations, please contact [here](https://www.tornadovm.org/contact-us).

## 6. Additional Resources

[Here](https://tornadovm.readthedocs.io/en/latest/resources.html) 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:

```bibtex
@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.

```bibtex
@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](https://tornadovm.readthedocs.io/en/latest/publications.html).

## 8. Acknowledgments

This work is partially funded by [Intel corporation](https://www.intel.com/content/www/us/en/homepage.html).
In addition, it has been supported by the following EU & UKRI grants (most recent first):

- EU Horizon Europe & UKRI [AERO 101092850](https://aero-project.eu/).
- EU Horizon Europe & UKRI [P2CODE 101093069](https://p2code-project.eu/).
- EU Horizon Europe & UKRI [ENCRYPT 101070670](https://encrypt-project.eu).
- EU Horizon Europe & UKRI [TANGO 101070052](https://tango-project.eu).
- EU Horizon 2020 [ELEGANT 957286](https://www.elegant-h2020.eu/).
- EU Horizon 2020 [E2Data 780245](https://e2data.eu).
- EU Horizon 2020 [ACTiCLOUD 732366](https://acticloud.eu).

Furthermore, TornadoVM has been supported by the following [EPSRC](https://www.ukri.org/councils/epsrc/) grants:

- [PAMELA EP/K008730/1](http://apt.cs.manchester.ac.uk/projects/PAMELA/).
- [AnyScale Apps EP/L000725/1](https://gow.epsrc.ukri.org/NGBOViewGrant.aspx?GrantRef=EP/L000725/1).

## 9. TornadoVM Team

Visit our [website](https://tornadovm.org) to meet the [team](https://www.tornadovm.org/about-us).

## 10. Licenses Per Module

To use TornadoVM, you can link the TornadoVM API to your application which is under [Apache 2](https://github.com/beehive-lab/TornadoVM/blob/master/LICENSE_APACHE2).

Each Java TornadoVM module is licensed as follows:

| Modules | License |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Tornado-API, Tornado-Assembly, Tornado-scripts,
Tornado-Annotation, Tornado-Unittests, Tornado-Benchmarks,
Tornado-Examples, Tornado-Matrices, Tornado-Drivers-OpenCL-Headers | [![License: Apache 2](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://github.com/beehive-lab/TornadoVM/blob/master/LICENSE_APACHE2) |
| Tornado-Runtime, Tornado-Drivers | [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2%20Classpath%20Exception-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) |