PENCIL: A Platform-Neutral Compute Intermediate Language for Accelerator Programming
File(s)paper.pdf (257.14 KB)
Accepted version
Author(s)
Type
Conference Paper
Abstract
Programming accelerators such as GPUs with
low-level APIs and languages such as OpenCL and CUDA
is difficult, error-prone, and not performance-portable. Automatic
parallelization and domain specific languages (DSLs)
have been proposed to hide complexity and regain performance
portability. We present PENCIL, a rigorously-defined subset of
GNU C99—enriched with additional language constructs—that
enables compilers to exploit parallelism and produce highly
optimized code when targeting accelerators. PENCIL aims to
serve both as a portable implementation language for libraries,
and as a target language for DSL compilers.
We implemented a PENCIL-to-OpenCL backend using a
state-of-the-art polyhedral compiler. The polyhedral compiler,
extended to handle data-dependent control flow and non-affine
array accesses, generates optimized OpenCL code. To demonstrate
the potential and performance portability of PENCIL
and the PENCIL-to-OpenCL compiler, we consider a number
of image processing kernels, a set of benchmarks from the
Rodinia and SHOC suites, and DSL embedding scenarios for
linear algebra (BLAS) and signal processing radar applications
(SpearDE), and present experimental results for four GPU
platforms: AMD Radeon HD 5670 and R9 285, NVIDIA
GTX 470, and ARM Mali-T604.
low-level APIs and languages such as OpenCL and CUDA
is difficult, error-prone, and not performance-portable. Automatic
parallelization and domain specific languages (DSLs)
have been proposed to hide complexity and regain performance
portability. We present PENCIL, a rigorously-defined subset of
GNU C99—enriched with additional language constructs—that
enables compilers to exploit parallelism and produce highly
optimized code when targeting accelerators. PENCIL aims to
serve both as a portable implementation language for libraries,
and as a target language for DSL compilers.
We implemented a PENCIL-to-OpenCL backend using a
state-of-the-art polyhedral compiler. The polyhedral compiler,
extended to handle data-dependent control flow and non-affine
array accesses, generates optimized OpenCL code. To demonstrate
the potential and performance portability of PENCIL
and the PENCIL-to-OpenCL compiler, we consider a number
of image processing kernels, a set of benchmarks from the
Rodinia and SHOC suites, and DSL embedding scenarios for
linear algebra (BLAS) and signal processing radar applications
(SpearDE), and present experimental results for four GPU
platforms: AMD Radeon HD 5670 and R9 285, NVIDIA
GTX 470, and ARM Mali-T604.
Date Issued
2015-10-21
Date Acceptance
2015-08-01
Citation
2015 International Conference on Parallel Architecture and Compilation, 2015, pp.138-149
ISBN
9781467395243
Publisher
IEEE
Start Page
138
End Page
149
Journal / Book Title
2015 International Conference on Parallel Architecture and Compilation
Copyright Statement
© 2015 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
Sponsor
Commission of the European Communities
Grant Number
287767
Source
2015 International Conference on Parallel Architecture and Compilation
Publication Status
Published
Start Date
2015-10-18
Finish Date
2015-10-21
Coverage Spatial
San Francisco, CA, USA