Directive-based compilers for GPUs

Swapnil Ghike, Rubén Gran, María J. Garzarán, David A. Padua

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

General Purpose Graphics Computing Units can be effectively used for enhancing the performance of many contemporary scientific applications. However, programming GPUs using machine-specific notations like CUDA or OpenCL can be complex and time consuming. In addition, the resulting programs are typically fine-tuned for a particular target device. A promising alternative is to program in a conventional and machine-independent notation extended with directives and use compilers to generate GPU code automatically. These compilers enable portability and increase programmer productivity and, if effective, would not impose much penalty on performance. This paper evaluates two such compilers, PGI and Cray. We first identify a collection of standard transformations that these compilers can apply. Then, we propose a sequence of manual transformations that programmers can apply to enable the generation of efficient GPU kernels. Lastly, using the Rodinia Benchmark suite, we compare the performance of the code generated by the PGI and Cray compilers with that of code written in CUDA. Our evaluation shows that the code produced by the PGI and Cray compilers can perform well. For 6 of the 15 benchmarks that we evaluated, the compiler generated code achieved over 85% of the performance of a hand-tuned CUDA version.

Original languageEnglish (US)
Title of host publicationLanguages and Compilers for Parallel Computing - 27th International Workshop, LCPC 2014, Revised Selected Papers
EditorsJames Brodman, Peng Tu
PublisherSpringer
Pages19-35
Number of pages17
ISBN (Electronic)9783319174723
DOIs
StatePublished - 2015
Event27th International Workshop on Languages and Compilers for Parallel Computing, LCPC 2014 - Hillsboro, United States
Duration: Sep 15 2014Sep 17 2014

Publication series

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

Other

Other27th International Workshop on Languages and Compilers for Parallel Computing, LCPC 2014
Country/TerritoryUnited States
CityHillsboro
Period9/15/149/17/14

Keywords

  • Accelerator
  • Cray
  • Directive-based compiler
  • Evaluation
  • GPGPU
  • OpenACC
  • PGI

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Directive-based compilers for GPUs'. Together they form a unique fingerprint.

Cite this