Workshop: LLVM-HPC2022: The Eighth Workshop on the LLVM Compiler Infrastructure in HPC
Authors: Shilei Tian (Stony Brook University), Joseph Huber (Advanced Micro Devices (AMD) Inc), Konstantinos Parasyris (Lawrence Livermore National Laboratory), Barbara Chapman (Stony Brook University), and Johannes Doefert (Lawrence Livermore National Laboratory)
Abstract: In this paper, we propose a direct GPU compilation scheme that leverages the portable target offloading interface provided by LLVM/OpenMP. Utilizing this infrastructure allows us to compile an existing host application for the GPU and execute it there with only a minimal wrapper layer for the user code, command line arguments, and a compiler provided GPU implementation of C/C++ standard library functions. The C/C++ library functions are partially implemented for direct device execution and otherwise fallback to remote procedure call (RPC) to call host functions transparently. Our proposed prototype will allow users to quickly compile for, and test on, the GPU without explicitly handling kernel launches, data mapping, or host-device synchronization. We evaluate our implementation using three proxy applications with host OpenMP parallelism and three microbenchmarks to test the correctness of our prototype GPU compilation.