Reflect, Transform, Accelerate: Bringing GPU Computing to Java
The talk presents HAT, a toolkit using Java Code Reflection to accelerate Java workloads on GPUs through reflection, transformation, and offloading to OpenCL or CUDA. It includes tensor-core and matrix-multiplication examples, plus performance profiling and tuning with NVIDIA Nsight Compute and Nsight Systems.
talk.summaryAiDisclaimer
talkDetail.whenAndWhere
Java’s code reflection API, developed in OpenJDK Project Babylon, opens up a new path for targeting foreign programming models directly from Java, including GPUs. This talk introduces the Heterogeneous Accelerator Toolkit (HAT), a Java parallel programming framework to accelerate modern workloads on specialised hardware through its three core stages: reflect, transform, and accelerate.
The reflect phase introduces the basics of code reflection and its key concepts, making the session accessible to developers new to the API. We then show how HAT reflects Java compute code into an analysable code model, transforms that model into a GPU-friendly representation, and accelerates execution by offloading selected computations to OpenCL or CUDA.
Then, this talk shows a set of examples including tensor-core programming and matrix multiplication, fundamental workloads for AI and natural-language processing. The talk also covers performance analysis and tuning of the CUDA backend with NVIDIA Nsight Compute and Nsight Systems, from profiling generated kernels to identifying optimisation opportunities.