PyOMP: Programming GPUs with OpenMP and Python

Giorgis Georgakoudis · OSTI OAI (U.S. Department of Energy Office of Scientific and Technical Information) · 2024

Python is the world's most popular programming language due to its high productivity and its vast, robust, production-level software ecosystem.However, its adoption in HPC is challenged due to: (1) performance limitations arising from its inherent flexibility as an interpreted language and its built-in thread-safety, and (2) its lack of a general, welldefined parallel programming model.Writing performance critical code in low-level languages, such as C/C++, is the norm for HPC.However, this limits access to Python's software ecosystem and hinders early career scientists who tend to use Python as their primary programming language.An earlier effort created PyOMP; an implementation of OpenMP in Python for CPU parallelism.PyOMP demonstrated promising performance on CPUs.GPUs, however, are fundamental for modern HPC.In this paper, we address Python's adoption challenges in HPC.We discuss our new design and implementation of PyOMP to support GPU architectures with significant extensions to interface Python to OpenMP GPU offloading and dynamic compilation.Using HPC proxy applications from HeCBench, we demonstrate performance competitive with OpenMP/GPU programs using C/C++ while maintaining the high productivity that has made Python so popular.

Read the paper · More papers on PaperTik