Skip to main navigation Skip to search Skip to main content

Extending the LLVM/Clang Framework for OpenMP Metadirective Support

  • Stony Brook University

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

6 Scopus citations

Abstract

OpenMP 5.0 introduces many new directives to meet the demand of emerging high performance computing systems. Among these new directives, the metadirective and declare variant directives are important to control the execution behavior of a given application by compile-Time adaptation based on the OpenMP context. The metadirective directive allows the selection of OpenMP directives based on the enclosing OpenMP context as well as on user-defined conditions. The declare variant directive declares a specialized variant of a base function and specifies the context in which that specialized variant is used. Support for these directives are available in few compilers with some limitations. Support for metadirective is not available in Clang. This paper presents our implementation of the metadirective directive in Clang. In this paper, we present an implementation which supports the OpenMP 5.0 metadirective specification. However, in addition, this work also implements a dynamic extension to the user-specified conditions. A dynamic evaluation of user-defined conditions provides programmers more freedom to express a range of adaptive algorithms that improve overall performance of a given application. For example, a program can estimate the cost of execution, with respect to time taken or energy consumption, of a kernel based on some dynamic or static variables and decide whether or not to offload the kernel to GPU using the metadirective. Since there is a significant lack of knowledge about the usage and performance analysis of metadirective, the work also studies its impact on application characteristics. To achieve this, we have modified several benchmark codes in the Rodinia benchmark suite. The Rodinia benchmark includes applications and kernels which target multi-core CPU and GPU platforms which helps programmers study the emerging computing platforms. Our modification to the Rodinia benchmarks enables the application developer to study the behavior of metadirective. Our analysis reveal that the main advantage of the dynamic implementation of metadirective is that it adds minimal to no overhead to the user application, in addition to allowing flexibility to the programmers to introduce portability and adaptability to their code. Our modification of the Rodinia benchmark suite provides several guidelines for programmers to achieve better performance with metadirective.

Original languageEnglish
Title of host publicationProceedings of LLVM-HPC2020 and HiPar 2020 - 6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, Held in conjunction with SC 2020
Subtitle of host publicationThe International Conference for High Performance Computing, Networking, Storage and Analysis
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages33-44
Number of pages12
ISBN (Electronic)9780738110424
DOIs
StatePublished - Nov 2020
Event6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, LLVM-HPC2020 and HiPar 2020 - Virtual, Atlanta, United States
Duration: Nov 12 2020 → …

Publication series

NameProceedings of LLVM-HPC2020 and HiPar 2020 - 6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, Held in conjunction with SC 2020: The International Conference for High Performance Computing, Networking, Storage and Analysis

Conference

Conference6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, LLVM-HPC2020 and HiPar 2020
Country/TerritoryUnited States
CityVirtual, Atlanta
Period11/12/20 → …

Keywords

  • Clang
  • Dynamic context
  • LLVM
  • Metadirective
  • OpenMP 5.0

Fingerprint

Dive into the research topics of 'Extending the LLVM/Clang Framework for OpenMP Metadirective Support'. Together they form a unique fingerprint.

Cite this