TornadoVM: Java for GPUs and FPGAs @QCon-London
Date:
Slides available here
Abstract
There is no single computer architecture that is best for executing all types of workloads efficiently. Therefore, the proliferation of heterogeneous hardware in recent years means that every system we program is likely to include a mix of computing elements; each of these with different hardware characteristics that enable programmers to improve performance while decreasing energy consumption. These new heterogeneous devices include multi-core CPUs, Graphics Processing Units (GPUs), and Field Programmable Gate Arrays (FPGAs). This trend has been followed by changes in software development norms that do not necessarily favor programmers.
A prime example is the two most popular heterogeneous programming languages, CUDA and OpenCL, which expose several low-level features to the API, making them difficult to use by non-expert users. Instead of using low-level programming languages, developers in industry and academia tend to use higher-level, object-oriented programming languages, typically executed on managed runtime environments, such as Java, R, Python, and JavaScript. Although many programmers might expect that such programming languages would have already been adapted for transparent execution on heterogeneous hardware, the reality is that their support is either very limited or absent.
In this talk, we present TornadoVM, a plugin for OpenJDK that allows Java programmers to automatically run on Heterogeneous Hardware such as multi-core CPUs, GPUs, and FPGAs. Furthermore, TornadoVM can perform live task-migration from one device to another entirely transparent for the user. To do so, TornadoVM consists of three software components: 1) A simple API for composing pipelines of existing Java methods. 2) An optimizing JIT compiler that extends the Graal compiler with hardware-aware optimizations that generate OpenCL C code. 3) A runtime system that executes TornadoVM specific bytecodes, it performs memory management. It also schedules the code for execution on GPUs, multi-core CPUs, and FPGAs, and it performs live task-migration between devices.
Additional Resources
TornadoVM source code
- TornadoVM @Github
- Docker images for NVIDIA GPUs and Intel Integrated GPUs: link
- Demos used in the QCon-Presentation