Supported Platforms
The following table includes the platforms that TornadoVM can be executed.
OS | Hardware |
---|---|
CentOS >= 7.3 | Any OpenCL compatible device (GPUs and CPUs >= 1.2, FPGAs >= 1.0) |
Fedora >= 21 | Any OpenCL compatible device (GPUs and CPUs >= 1.2, FPGAs >= 1.0) |
Ubuntu >= 16.04 | Any OpenCL compatible device (GPUs and CPUs >= 1.2, FPGAs >= 1.0) |
Mac OS X Mojave 10.14.6 | Any OpenCL compatible device (GPUs and CPUs >= 1.2) |
Mac OS X Catalina 10.15.3 | Any OpenCL compatible device (GPUs and CPUs >= 1.2) |
TornadoVM can be currently executed with the following two configurations:
- TornadoVM with JDK 8 with JVMCI-8 support: see the installation guide here
- TornadoVM with GraalVM (either with JDK 8 or JDK 11): see the installation guide here
$ tornado uk.ac.manchester.tornado.examples.HelloWorld
Use the following command to identify the ids of the Tornado-compatible heterogeneous devices:
$ tornado --devices
Tornado device output corresponds to:
Tornado device=<driverNumber>:<deviceNumber>
Example output:
Number of Tornado drivers: 1
Number of devices: 3
Tornado device=0:0
NVIDIA CUDA -- GeForce GTX 1050
Tornado device=0:1
Intel(R) OpenCL -- Intel(R) HD Graphics
Tornado device=0:2
Intel(R) OpenCL -- Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
The output might vary depending on your OpenCL installation. To run TornadoVM, you should see at least one device.
To run on a specific device use the following option:
-D<s>.<t>.device=<driverNumber>:<deviceNumber>
Where s
is the schedule name and t
is the task name.
For example running on device [1] (Intel HD Graphics in our example) will look like this:
$ tornado -Ds0.t0.device=0:1 uk.ac.manchester.tornado.examples.HelloWorld
The command above will run the HelloWorld example on the integrated GPU (Intel HD Graphics).
$ tornado uk.ac.manchester.tornado.benchmarks.BenchmarkRunner sadd
To run all unittests in Tornado:
$ make tests
To run an individual unittest:
$ tornado-test.py uk.ac.manchester.tornado.unittests.TestHello
Also, it can be executed in verbose mode:
$ tornado-test.py --verbose uk.ac.manchester.tornado.unittests.TestHello
To test just a method of a unittest class:
$ tornado-test.py --verbose uk.ac.manchester.tornado.unittests.TestHello#testHello
To see the OpenCL generated kernel for a unittest:
$ tornado-test.py --verbose -pk uk.ac.manchester.tornado.unittests.TestHello#testHello
To execute in debug mode:
$ tornado-test.py --verbose --debug uk.ac.manchester.tornado.unittests.TestHello#testHello
task info: s0.t0
platform : NVIDIA CUDA
device : GeForce GTX 1050 CL_DEVICE_TYPE_GPU (available)
dims : 1
global work offset: [0]
global work size : [8]
local work size : [8]
The code formatter in Eclipse is automatically applied after generating the setting files.
$ mvn eclipse:eclipse
$ python scripts/eclipseSetup.py
For Netbeans, the Eclipse Formatter Plugin is needed.
Install plugins:
- Eclipse Code Formatter
- Save Actions
Then :
- Open File > Settings > Eclipse Code Formatter
- Check the
Use the Eclipse code
formatter radio button - Set the Eclipse Java Formatter config file to the XML file stored in /scripts/templates/eclise-settings/Tornado.xml
- Set the Java formatter profile in Tornado
To use the TornadoVM API in your projects, you can checkout our maven repository as follows:
<repositories>
<repository>
<id>universityOfManchester-graal</id>
<url>https://raw.githubusercontent.com/beehive-lab/tornado/maven-tornadovm</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>tornado</groupId>
<artifactId>tornado-api</artifactId>
<version>0.6</version>
</dependency>
</dependencies>
Notice that, for running with TornadoVM, you will need either the docker images or the full JVM with TornadoVM enabled.
- 0.6
- 0.5
- 0.4
- 0.3
- 0.2
- 0.1.0