TornadoVM v8.0.0 Replaces Graal Compiler With New TC Compiler
TornadoVM v8.0.0 introduces the TC compiler, a custom Java-based solution that replaces Graal to generate CUDA, OpenCL, and Metal code for heterogeneous…
TornadoVM v8.0.0 replaces the vendored Graal compiler and JVMCI dependency with TC, a pure Java compiler that reads class files directly, optimizes them in its own SSA intermediate representation, and prints CUDA C++, OpenCL C, or Metal Shading Language.
Pull request #1228 modifies 1,218 files, adding 40,166 lines while removing 119,699 lines, and deletes the relocated Graal module, jdk.internal.vm.ci, and Graal packages across all three backends. Application code remains unchanged, preserving TaskGraph, TornadoExecutionPlan, KernelContext, @Parallel, @Reduce, kernel ABI, drivers, and profiler keys.
TC requires JDK 21 or later, operating without GPU or TornadoVM runtime dependencies through six compilation stages: a bytecode frontend, TC-SSA form using block arguments, optimization passes, Tornado-specific lowering, control-flow structuring, and a shared C-family printer. Optimization passes feature canonicalisation, constant folding, GVN, LICM, dead-code elimination, and small-loop unrolling.
Testing across devices shows specific pass counts for Graal versus TC v8.0.0: CUDA on RTX 4090 records 1,516 to 1,539; OpenCL on RTX 4090 reaches 1,027 to 1,057; OpenCL on Intel UHD 770 moves from 932 to 934; and Metal on Apple M3 Pro goes from 942 to 941. In jitLLM applications running Llama-3.2-1B Q8 and Qwen3-0.6B F16, output is token-identical with throughput at 1.06–1.14× Graal on CUDA and 1.04–1.09× on OpenCL.
