Skip to content

A utility that launches programs (Java classes and Python polyglot programs) on the most efficient devices, based on performance or energy efficiency.

License

Notifications You must be signed in to change notification settings

beehive-lab/dynamic-intelligent-scheduler

Repository files navigation

TornadoVM Feature Extraction and Intelligent Execution

This tool extracts runtime and hardware features from a TornadoVM application and uses them to predict the optimal device for executing a given workload. It then runs the workload on the predicted device and reports performance.

🚀 Overview

This project performs the following steps:

  1. Code Feature Extraction: Runs the specified TornadoVM example to collect code-level metrics.
  2. Device Detection: Lists all available computing devices (CPU, GPU, iGPU).
  3. Feature Parsing: Loads extracted features from a JSON format.
  4. Device Prediction: Predicts the best device for execution based on feature analysis.
  5. Workload Execution: Runs the computation on the predicted optimal device.

🛠️ Prerequisites

Before running the script, make sure you have:

  • TornadoVM installed with the OpenCL backend.
  • A compatible Java 21+ GraalVM environment.
  • Python 3 with necessary dependencies (for the extractor script).
  • Your environment variables properly configured.

🔧 Environment Setup

Before running the script, configure your environment:

export JAVA_HOME=/path/to/graalvm
export PATH=/path/to/tornadovm/bin:$PATH
export TORNADO_SDK=/path/to/tornadovm/sdk
source setvars.sh

Replace /path/to/... with your actual local paths.

How to Run?

To run the feature extraction and execution pipeline on a sample matrix multiplication workload:

python tornado_inference_runner -e tornado.examples/uk.ac.manchester.tornado.examples.compute.MatrixMultiplication1D -s 1024

Command Line Arguments

Argument Description Default
-e, --example TornadoVM example class to run Required
-s, --size Input size for the computation Required
-m, --model-dir Directory containing trained models Current directory
-f, --features-dir Directory where features.json will be saved /home/mikepapadim/manchester/TornadoVM/
-t, --tornado-path Path to tornado command tornado
-v, --verbose Enable verbose output False

Output Summary

After running the tool, you'll see:

  • Feature extraction summary
  • Available devices, including GPU and iGPU details
  • Predicted optimal device based on extracted features
  • Actual execution on the predicted device
  • Final analysis summary

Status

This version currently operates with TornadoVM-supported backends (OpenCL tested). It supports automatic device selection based on extracted features.

Additional Material

Acknowledgments

This work is supported by UK Research and Innovation (UKRI) under the UK government’s Horizon Europe funding guarantee for grant number 10039107 TANGO.

License

MIT

About

A utility that launches programs (Java classes and Python polyglot programs) on the most efficient devices, based on performance or energy efficiency.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •