Kernel Fusion of Parallel Skeletons for GPU using Metaprogramming - Soares, João Antonio; Du Bois, André Rauber; Cavalheiro, Gerson Geraldo H. (Anais da Escola Regional de Alto Desempenho da Região Sul (ERAD-RS), 2026)
Graphics Processing Units (GPUs) are the current generation of accelerators for high-performance computing (HPC). However, developing efficient applications fully utilizing the resources of the GPU is a time-consuming task. Algorithmic Skeletons help to simplify development by providing reusable patterns, but it often results in many independent kernel launches that are bounded by memory bandwidth, which otherwise could be fused to increase performance gains. In this work, we developed a fusion module that enables programmers to write composable GPU kernels that are efficiently merged. Our approach is applied to PolyHok, a domain-specific language (DSL) that exposes metaprogramming features enabling kernel fusion as high-level code transformations. The practical benefits of this solution are that it doesn’t require modifying any existing compilers. We provide an open-source prototype implementation as well as an experimental evaluation of the feasibility of fusing skeletons.