Programming GPUs with C++14 and Just-In-Time Compilation

Haidl M, Hagedorn B, Gorlatch S

Research article in edited proceedings (conference) | Peer reviewed

Abstract

Systems that comprise accelerators (e.g., GPUs) promise high performance, but their programming is still a challenge, mainly because of two reasons: 1) two distinct programming models have to be used within an application: one for the host CPU (e.g., C++), and one for the accelerator (e.g., OpenCL or CUDA); 2) using Just-In-Time (JIT) compilation and its optimization opportunities in both OpenCL and CUDA requires a cumbersome preparation of the source code. These two aspects currently lead to long, poorly structured, and error-prone GPU codes. Our PACXX programming approach addresses both aspects: 1) parallel programs are written using exclusively the C++ programming language, with modern C++14 features including variadic templates, generic lambda expressions, as well as STL containers and algorithms; 2) a simple yet powerful API (PACXX-Reflect) is offered for enabling JIT in GPU kernels; it uses lightweight runtime reflection to modify the kernel's behaviour during runtime. We show that PACXX codes using the PACXX-Reflect are about 60% shorter than their OpenCL and CUDA Toolkit equivalents and outperform them by 5% on average.

Details about the publication

Page range247-256
Publishing companyIOP Publishing
Place of publicationAmsterdam, Netherlands
Title of seriesAdvances in Parallel Computing (ISSN: 0927-5452)
Volume of series27
StatusPublished
Release year2016
Language in which the publication is writtenEnglish
ConferenceAdvances in Parallel Computing: On the Road to Exascale, ParCo2015, Edinburgh, Schottland, undefined
ISBN978-1-61499-620-0
DOI10.3233/978-1-61499-621-7-247
Link to the full texthttp://ebooks.iospress.nl/volumearticle/42662

Authors from the University of Münster

Gorlatch, Sergei
Professur für Praktische Informatik (Prof. Gorlatch)
Hagedorn, Bastian
Professur für Praktische Informatik (Prof. Gorlatch)
Haidl, Michael
Professur für Praktische Informatik (Prof. Gorlatch)