Advancing OpenMP Offload Debugging Capabilities in LLVM
Johannes Doerfert, Joseph Huber, Melanie Cornelius · 2021
Debugging an application is famously twice as hard as writing the application in the first place. While this sentiment predates modern GPU programming by decades, it is all the more true when the application has to manage computation and memory across different architectures, memory spaces, and execution modes. Any subtle error, whether in the application, the compiler, or runtime system, can lead to unexpected behavior that is hard to understand from the program output alone. While some tooling solutions for GPU debugging exist, their maturity and usefulness varies gravely between vendors. Furthermore, as OpenMP offloading puts an abstraction layer between the programmer and the underlying hardware, the information from a native GPU driver (debugging tool) is not always transferable to the OpenMP programming model. As the OpenMP Tooling [12] (OMPT) and Debug [4] (OMPD) interfaces are still not ready to debug OpenMP offloading code in production, developers have a hard time to comprehend the implementation state, error sources, and interplay of the OpenMP world with the foreign device runtimes, e.g., CUDA.