Skip to main navigation Skip to search Skip to main content

Experience Report: Writing a Portable GPU Runtime with OpenMP 5.1

  • Shilei Tian
  • , Jon Chesterfield
  • , Johannes Doerfert
  • , Barbara Chapman
  • Stony Brook University
  • AMD
  • Argonne National Laboratory

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

13 Scopus citations

Abstract

GPU runtimes are historically implemented in CUDA or other vendor specific languages dedicated to GPU programming. In this work we show that OpenMP 5.1, with minor compiler extensions, is capable of replacing existing solutions without a performance penalty. The result is a performant and portable GPU runtime that can be compiled with LLVM/Clang to Nvidia and AMD GPUs without the need for CUDA or HIP during its development and compilation. While we tried to be OpenMP compliant, we identified the need for compiler extensions to achieve the CUDA performance with our OpenMP runtime. We hope that future versions of OpenMP adopt our extensions to make device programming in OpenMP also portable across compilers, not only across execution platforms. The library we ported to OpenMP is the OpenMP device runtime that provides OpenMP functionality on the GPU. This work opens the door for shipping OpenMP offloading with a Linux distribution’s LLVM package as the package manager would not need a vendor SDK to build the compiler and runtimes. Furthermore, our OpenMP device runtime can support a new GPU target through the use of a few compiler intrinsics rather than requiring a reimplementation of the entire runtime.

Original languageEnglish
Title of host publicationOpenMP
Subtitle of host publicationEnabling Massive Node-Level Parallelism - 17th International Workshop on OpenMP, IWOMP 2021, Proceedings
EditorsSimon McIntosh-Smith, Bronis R. de Supinski, Jannis Klinkenberg
PublisherSpringer Science and Business Media Deutschland GmbH
Pages159-169
Number of pages11
ISBN (Print)9783030852610
DOIs
StatePublished - 2021
Event17th International Workshop on OpenMP, IWOMP 2021 - Bristol, United Kingdom
Duration: Sep 14 2021Sep 16 2021

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume12870 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference17th International Workshop on OpenMP, IWOMP 2021
Country/TerritoryUnited Kingdom
CityBristol
Period09/14/2109/16/21

Keywords

  • Accelerator
  • LLVM
  • OpenMP
  • Portability
  • Runtimes
  • Target offloading

Fingerprint

Dive into the research topics of 'Experience Report: Writing a Portable GPU Runtime with OpenMP 5.1'. Together they form a unique fingerprint.

Cite this