News and views from members of the Java team at Oracle
Java’s code reflection API, developed in OpenJDK Project Babylon, opens a new path to targeting foreign programming models directly from Java—including GPUs. This talk introduces the Heterogeneous Accelerator Toolkit (HAT), a Java parallel programming framework that accelerates modern workloads on specialised hardware through three core stages: reflect, transform, and accelerate.
We begin with the basics of code reflection and its key concepts, making the session accessible to developers new to the API. From there, we explore how HAT reflects Java compute code into an analysable code model, transforms it into a GPU-friendly representation, and offloads selected computations to OpenCL or CUDA for accelerated execution.
Through examples of tensor-core programming and matrix multiplication—fundamental building blocks for AI and natural-language processing—we demonstrate HAT in action. We also explore performance analysis and tuning of the CUDA backend with NVIDIA Nsight Compute and Nsight Systems, from profiling generated kernels to identifying optimisation opportunities.
Recorded at Devoxx Belgium 2026.