TornadoVM Adds Apple Metal Backend, Enabling Java to Run Directly on Apple Silicon GPUs
Key Takeaways
- ▸TornadoVM now supports Apple Metal, allowing Java applications to run directly on Apple Silicon GPUs without OpenCL
- ▸The implementation adapts TornadoVM's existing OpenCL backend to work with Metal Shading Language and Metal API
- ▸Basic builds and tests are passing, with work ongoing to achieve feature parity with OpenCL, PTX, and SPIRV backends
Summary
TornadoVM, an open-source framework for accelerating Java applications on GPUs, has introduced a new Apple Metal backend that enables Java code to run directly on Apple Silicon GPUs. The implementation, currently in pull request stage on GitHub, adapts TornadoVM's existing OpenCL backend to work with Apple's Metal Shading Language (MSL) and Metal API. Developer mikepapadim announced the development, noting that basic builds and tests are already passing.
The Metal backend represents a significant expansion of TornadoVM's hardware support, which previously focused on OpenCL, PTX (NVIDIA), and SPIRV backends. By leveraging Metal's native GPU acceleration on Apple Silicon, Java developers can now access the full computing power of M-series chips without requiring cross-platform abstraction layers like OpenCL, which Apple deprecated in macOS 10.14.
Before the pull request can be merged, the team aims to achieve parity with existing backends in terms of pass rates, ensure compatibility with applications like GPULlama3.java, and clean up OpenCL references in the codebase. The implementation includes Maven wrapper support to streamline the build process for contributors. Once complete, this backend will make TornadoVM one of the few frameworks enabling high-performance GPU computing in Java on Apple's custom silicon.
- The Metal backend addresses Apple's deprecation of OpenCL and provides native GPU acceleration on M-series chips
- The project includes build improvements like Maven wrapper support to ease contributor onboarding
Editorial Opinion
This is a pragmatic and important addition to TornadoVM's ecosystem. With Apple having deprecated OpenCL years ago, developers working on Apple Silicon have been stuck with suboptimal GPU acceleration options for Java workloads. By implementing a native Metal backend, TornadoVM is filling a genuine gap in the high-performance computing landscape for Java. The decision to base the implementation on the existing OpenCL backend shows smart engineering—reusing proven architecture while adapting to platform-specific requirements.



