27218

Direct GPU Compilation and Execution for Host Applications with OpenMP Parallelism

Shilei Tian, Joseph Huber, Konstantinos Parasyris, Barbara Chapman, Johannes Doefert
Department of Computer Science, Stony Brook University, Stony Brook, USA
Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC), 2022

@article{tian2022direct,

   title={Direct GPU Compilation and Execution for Host Applications with OpenMP Parallelism},

   author={Tian, Shilei and Huber, Joseph and Parasyris, Konstantinos and Chapman, Barbara and Doefert, Johannes},

   year={2022}

}

Download Download (PDF)   View View   Source Source   

816

views

Currently, offloading to accelerators requires users to identify which regions are to be executed on the device, what memory needs to be transferred, and how synchronization is to be resolved. On top of these manual tasks, many standard (C/C++ library) functions, such as file I/O or memory manipulation, cannot be directly executed on the device and need to be worked around by the user explicitly. This makes it difficult to port programs in the first place but also hinders developers testing features on the GPU and within the GPU compilation pipeline. Existing tests and test suites for the host are effectively unusable for accelerators and need to be manually ported to provide the same benefits for the devices as they do on the host. 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.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2024 hgpu.org

All rights belong to the respective authors

Contact us: