Skip to main navigation Skip to search Skip to main content

Kernel Fusion/Decomposition for Automatic GPU-Offloading

  • Alok Mishra
  • , Martin Kong
  • , Barbara Chapman
  • Stony Brook University
  • Brookhaven National Laboratory

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

5 Scopus citations

Abstract

The massively parallel architecture of GPU accelerators are being harnessed to expedite computational workloads in cutting edge scientific research. Unfortunately writing applications for GPUs requires extensive knowledge of the underlying architecture, the application and the interfacing programming model. Moreover, (re-)writing kernels using lower-level programming models such as CUDA and OpenCL is a burden for application scientists. A more appealing strategy is to leverage a programming model layered on directive-based optimization: OpenMP, whose recent specification significantly extends its accelerator functionalities. Despite this, it is still quite challenging to optimize large scale applications, since 'pragmatizing' each kernel is a repetitive and complex task. In large scale applications most of the operations could be small, don't have enough computational work to justify a GPU execution, deeply buried in the library specification, or evenly spread throughout the application. Thus, we seek to design and build a compiler framework that can automatically and profitably offload regions of code with these characteristics. The driving principle of our work resides in generating numerous kernel variants that result from fusing and/or decomposing existing function bodies. We analyze the program's call graph to determine the 'proximity' of kernel calls and evaluate the degree of data reuse among adjacent or 'close-enough' calls. When such patterns are detected we generate several scenarios, until producing a single variant whose footprint is near the capacity of the GPU. To compare the potential performance among the various kernel variants generated, we are designing an adaptive cost model. The precision of this cost model will depend upon the analyzability of the program. We are also building upon existing cost models like Baghsorkhi et al.'s model which proposed a work flow graph based analytical model and a recent Hong et al.'s model which propose the use of abstract kernel emulations to help identify the performance bottlenecks of a GPU program execution. Along with these we introduce GPU initialization and data transfer cost to the model. Once the profitable kernel variants are detected, we automatically insert pertinent OpenMP directives and provide a newly generated code supporting GPU offloading.

Original languageEnglish
Title of host publicationCGO 2019 - Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization
EditorsTipp Moseley, Alexandra Jimborean, Mahmut Taylan Kandemir
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages283-284
Number of pages2
ISBN (Electronic)9781728114361
DOIs
StatePublished - Mar 5 2019
Event17th IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2019 - Washington, United States
Duration: Feb 16 2019Feb 20 2019

Publication series

NameCGO 2019 - Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization

Conference

Conference17th IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2019
Country/TerritoryUnited States
CityWashington
Period02/16/1902/20/19

Fingerprint

Dive into the research topics of 'Kernel Fusion/Decomposition for Automatic GPU-Offloading'. Together they form a unique fingerprint.

Cite this