This project demonstrates data transfer patterns using TornadoVM:
- FIRST_EXECUTION vs EVERY_EXECUTION (for input data)
- EVERY_EXECUTION vs UNDER_DEMAND (for output data)
- UNDER_DEMAND (for a partial output using DataRange)
- Chain multiple tasks in a single TaskGraph to return the final result
- Chain multiple tasks in multiple TaskGraphs to return the final result
- TornadoVM installed and sourced
- Java 21+
- GPU backend (OpenCL / PTX / SPIR-V)
sdk use java 21.0.9-tem
sdk use tornadovm 2.2.0-openclThe main class requires an integer to define which scenarios to run.
Passing 1234 is treated as a special value and triggers execution of all four scenarios.
Passing any other number (such as 3) limits execution to the indexed scenario.
To build:
mvn clean packageTo run all scenarios:
tornado --jvm="-Xmx24g" -cp target/tornadovm-data-transfer-demo-1.0-SNAPSHOT.jar demo.Main 12345 or
java @$TORNADOVM_HOME/tornado-argfile -Xmx24g -cp target/tornadovm-data-transfer-demo-1.0-SNAPSHOT.jar demo.Main 12345This work is partially funded by the following EU & UKRI grants (most recent first):
- EU Horizon Europe & UKRI AERO 101092850.
- EU Horizon Europe & UKRI P2CODE 101093069.