Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3624062.3624605acmotherconferencesArticle/Chapter ViewAbstractPublication PagesscConference Proceedingsconference-collections
research-article

Specialized Kernels for Optimizing GPU Offload in OpenMP

Published: 12 November 2023 Publication History

Abstract

Programming models for general purpose GPU (GPGPU) computing include grid and non-grid languages. Grid languages like CUDA and HIP map directly to the GPU hardware and can extract high performance from applications. However, this low-level programming approach makes them more difficult to program than non-grid languages such as C, C++, and Fortran with OpenMP target offload. Furthermore, grid languages often have more portability issues than non-grid languages. However, code generated from non-grid languages using automatic compiler and runtime techniques often incur higher overhead while generating GPU kernels for target regions.
This paper discusses compiler and runtime techniques to generate specialized, high-performance kernels for OpenMP target regions in certain common situations. We outline the conditions under which specialized kernels are generated for OpenMP target regions, both with and without reduction clauses. Experimental results on AMD GPUs indicate that a large percentage of OpenMP target regions are amenable to specialization and consequent improvement in performance.

Supplemental Material

MP4 File - Conference presentation recording
Recording of "Specialized Kernels for Optimizing GPU Offload in OpenMP" presentation at the Tenth Workshop on Accelerator Programming and Directives (WACCPD 2023)

References

[1]
Carlo Bertolli, Samuel F. Antao, Gheorghe-Teodor Bercea, Arpith C. Jacob, Alexandre E. Eichenberger, Tong Chen, Zehra Sura, Hyojin Sung, Georgios Rokos, David Appelhans, and Kevin O’Brien. 2015. Integrating GPU Support for OpenMP Offloading Directives into Clang. In Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC (Austin, Texas) (LLVM ’15). 1–11. https://doi.org/10.1145/2833157.2833161
[2]
Carlo Bertolli, Samuel F. Antao, Alexandre E. Eichenberger, Kevin O’Brien, Zehra Sura, Arpith C. Jacob, Tong Chen, and Olivier Sallenave. 2014. Coordinating GPU Threads for OpenMP 4.0 in LLVM. In 2014 LLVM Compiler Infrastructure in HPC. 12–21. https://doi.org/10.1109/LLVM-HPC.2014.10
[3]
OpenMP Architecture Review Board. 2023. The OpenMP API specification for parallel programming.https://www.openmp.org/specifications/
[4]
Holger Brunst, Sunita Chandrasekaran, Florina M. Ciorba, Nick Hagerty, Robert Henschel, Guido Juckeland, Junjie Li, Verónica G. Melesse Vergara, Sandra Wienke, and Miguel Zavala. 2022. First Experiences in Performance Benchmarking with the New SPEChpc 2021 Suites. In 2022 22nd IEEE International Symposium on Cluster, Cloud and Internet Computing (CCGrid). 675–684. https://doi.org/10.1109/CCGrid54584.2022.00077
[5]
Joshua Hoke Davis, Christopher Daley, Swaroop Pophale, Thomas Huber, Sunita Chandrasekaran, and Nicholas J. Wright. 2021. Performance Assessment of OpenMP Compilers Targeting NVIDIA V100 GPUs. In Accelerator Programming Using Directives, Sridutt Bhalachandra, Sandra Wienke, Sunita Chandrasekaran, and Guido Juckeland (Eds.). Springer International Publishing, 25–44.
[6]
Tom Deakin, James Price, Matthew Martineau, and Simon McIntosh-Smith. 2018. Evaluating Attainable Memory Bandwidth of Parallel Programming Models via BabelStream. International Journal of Computational Science and Engineering 17, 3 (Jan 2018), 247–262. https://doi.org/10.1504/IJCSE.2018.095847
[7]
Johannes Doerfert, Jose Manuel Monsalve Diaz, and Hal Finkel. 2019. The TRegion Interface and Compiler Optimizations for OpenMP Target Regions. In OpenMP: Conquering the Full Hardware Spectrum: 15th International Workshop on OpenMP, IWOMP 2019, Auckland, New Zealand, September 1113, 2019, Proceedings (Auckland, New Zealand). 153–167. https://doi.org/10.1007/978-3-030-28596-8_11
[8]
Johannes Doerfert, Atemn Patel, Joseph Huber, Shilei Tian, Jose M Monsalve Diaz, Barbara Chapman, and Giorgis Georgakoudis. 2022. Co-Designing an OpenMP GPU Runtime and Optimizations for Near-Zero Overhead Execution. In 2022 IEEE International Parallel and Distributed Processing Symposium (IPDPS). 504–514. https://doi.org/10.1109/IPDPS53621.2022.00055
[9]
Simon Garcia De Gonzalo, Sitao Huang, Juan Gómez-Luna, Simon Hammond, Onur Mutlu, and Wen-mei Hwu. 2019. Automatic Generation of Warp-Level Primitives and Atomic Instructions for Fast and Portable Parallel Reduction on GPUs. In 2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 73–84. https://doi.org/10.1109/CGO.2019.8661187
[10]
Joseph Huber, Melanie Cornelius, Giorgis Georgakoudis, Shilei Tian, Jose M Monsalve Diaz, Kuter Dinel, Barbara Chapman, and Johannes Doerfert. 2022. Efficient Execution of OpenMP on GPUs. In 2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 41–52. https://doi.org/10.1109/CGO53902.2022.9741290
[11]
LLVM 2023. The LLVM Compiler Infrastructure.https://llvm.org
[12]
Justin Luitjens. 2014. Faster Parallel Reductions on Kepler. https://developer.nvidia.com/blog/faster-parallel-reductions-kepler
[13]
ROCm 2023. AMD ROCmTM Platform.https://rocm.docs.amd.com/en/latest/
[14]
Ben Sander. 2016. AMD GCN Assembly: Cross-Lane Operations. https://gpuopen.com/learn/amd-gcn-assembly-cross-lane-operations/
[15]
SPEC 2023. Standard Performance Evaluation Corporation. https://www.spec.org/
[16]
SPEC ACCEL 2019. Standard Performance Evaluation Corporation ACCEL benchmark suite. https://www.spec.org/accel/
[17]
SPEChpc 2021. Standard Performance Evaluation Corporation SPEChpc 2021 benchmark suite. https://www.spec.org/hpc2021/
[18]
Shilei Tian, Jon Chesterfield, Johannes Doerfert, and Barbara Chapman. 2021. Experience Report: Writing a Portable GPU Runtime with OpenMP 5.1. In OpenMP: Enabling Massive Node-Level Parallelism: 17th International Workshop on OpenMP, IWOMP 2021, Bristol, UK, September 1416, 2021, Proceedings (Bristol, United Kingdom). 159–169. https://doi.org/10.1007/978-3-030-85262-7_11

Cited By

View all
  • (2024)ompTest – Unit Testing with OMPTSC24-W: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis10.1109/SCW63240.2024.00031(196-203)Online publication date: 17-Nov-2024

Index Terms

  1. Specialized Kernels for Optimizing GPU Offload in OpenMP

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    SC-W '23: Proceedings of the SC '23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis
    November 2023
    2180 pages
    ISBN:9798400707858
    DOI:10.1145/3624062
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 12 November 2023

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Compiler
    2. GPU
    3. Kernel
    4. LLVM
    5. Offload
    6. OpenMP
    7. Parallel
    8. Reduction.
    9. Runtime

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    SC-W 2023

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)54
    • Downloads (Last 6 weeks)5
    Reflects downloads up to 27 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)ompTest – Unit Testing with OMPTSC24-W: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis10.1109/SCW63240.2024.00031(196-203)Online publication date: 17-Nov-2024

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format.

    HTML Format

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media