Frequently Asked Questions

TornadoVM primarily supports Java. However, with the integration with GraalVM you can call your TornadoVM-compatible Java code through other programming languages supported by GraalVM's polyglot runtime (e.g., Python, R, Ruby, Javascript, Node.js, etc).

Here you can find examples of how to use TornadoVM with GraalVM Polyglot.

No, TornadoVM is not a DSL. It compiles a subset of Java code to OpenCL and PTX.
The TornadoVM API only provides two Java annotations (@Parallel and @Reduce) plus a light API to create task-schedules (groups of Java methods to be accelerated by TornadoVM).

Is TornadoVM a DSL?

Which programming languages does TornadoVM support?

What is Dynamic Reconfiguration?

It is a novel feature of TornadoVM, in which the user selects a metric on which the system decides how to map a specific computation on a particular device. Further details and instructions on how to enable this feature can be found here:

More information are available here.

Is TornadoVM supported by a company?

No, TornadoVM has been developed in the Beehive-Lab of the Advanced Processor Technology Group (APT) at The University of Manchester.

Still have questions? Get in touch and we’ll be happy to help.

What can TornadoVM do?

TornadoVM accelerates parts of your Java applications on heterogeneous hardware devices such as multicore CPUs, GPUs, and FPGAs. TornadoVM is currently being used to accelerate machine learning and deep learning applications, computer vision, physics simulations, financial applications, computational photography, natural language processing and signal processing.
 

How can I use it?

TornadoVM can be installed from scratch as long as one of the supported JVMs (OpenJDK 8/11, GraalVM 8/11, Red Hat Mandrel 11, Amazon Corretto 11) has been installed. Alternatively, the docker images of TornadoVM can be used to run a program on NVIDIA or Intel HD Graphics GPUs.

There are several examples available showing how to use TornadoVM API and how to run with TornadoVM.

Does it support the whole Java Language?

No, TornadoVM supports a subset of the Java programming language. A list of unsupported features along with the reasoning behind it can be found here.

Can TornadoVM degrade the performance of my application?

No, TornadoVM can only increase the performance of your application because it can dynamically change the execution of a program at runtime onto another device. If a particular code segment cannot be accelerated, then execution falls back to the host JVM which will execute your code on the CPU as it would normally do.
Also with the Dynamic Reconfiguration, TornadoVM discovers the fastest possible device for a particular code segment completely transparently to the user.

How do I know which parts of my application are suitable for acceleration?

TornadoVM makes use of the Java Virtual Machine Common Interface (JVMCI) that is included from Java 9 to compile Java bytecode to OpenCL C / PTX at runtime. As a JVMCI implementation, TornadoVM uses Graal (it extends the Graal IR and includes new backends for OpenCL C and PTX code generation).

How do I know which parts of my application are suitable for acceleration?

Workloads with for-loops that do not have dependencies between iterations are very good candidates to offload on accelerators. Examples of this pattern are NBody computation, Black-scholes, DFT, KMeans, etc.
Besides, matrix-type applications are good candidates, such as matrix-multiplication widely used in machine and deep learning.

Does TornadoVM support only OpenCL devices?

No. Currently, TornadoVM supports two compiler backends and therefore, it is able to generate OpenCL and PTX code depending on the hardware configuration.

Why is it called a VM?

The VM name is used because TornadoVM implements its own set of bytecodes for handling heterogeneous execution. These bytecodes are used for handling JIT compilation, device exploration, data management and live task-migration for heterogeneous devices (multi-core CPUs, GPUs, and FPGAs). We sometimes refer to a VM inside a VM (nested VM). The main VM is the Java Virtual Machine, and TornadoVM sits on top of that.

More information are available here.

 

How can I contribute to TornadoVM?

TornadoVM is an open-source project, and, as such, we welcome contributions.

  • Look at Github issues tagged with good first issue.

  • Documentation: you can help to improve install documentation, testing platforms, and scripts to easy deploy TornadoVM.

  • TornadoVM use-cases: Develop use cases that use TornadoVM for acceleration: block-chain, graphical version of NBody, filters for photography, etc.

  • TornadoVM Development / Improvements: If you would like to contribute to the TornadoVM internals, here is a list of pending tasks/improvements:

    • Port all Python-2 scripts to Python-3.

    • Implement a performance plot suite when running the benchmark runner. This should plot speedups against serial Java as well as stacked bars with breakdown analysis (e.g. time spent on compilation, execution, and data transfers).

    • Port TornadoVM to Windows 10 - port bash scripts and adapt Python scripts to build with Windows 10.

Here you can find more information about how to contribute, code conventions, and tasks.

Does TornadoVM support calls to standard Java libraries?

Partially yes. TornadoVM currently supports calls to the Math library. However, invocations that imply I/O are not supported.

© TornadoVM 2021 |

Funded by the European Union Horizon 2020 E2Data 780245 grant, and EPSRC.