Towards Composable GPU Programming: Programming GPUs with Eager Actions and Lazy Views

Haidl M, Steuwer M, Dirks H, Humernbrum T, Gorlatch S

Forschungsartikel in Sammelband (Konferenz) | Peer reviewed

Zusammenfassung

In this paper, we advocate a composable approach to programming systems with Graphics Processing Units (GPU): programs are developed as compositions of generic, reusable patterns. Current GPU programming approaches either rely on low-level, monolithic code without patterns (CUDA and OpenCL), which achieves high performance at  the cost of cumbersome and error-prone programming, or they improve the programmability by using pattern-based abstractions (e.g., Thrust) but pay a performance penalty due to inefficient implementations of pattern composition. We develop an API for GPUs based programming on C++ with STL-style patterns and its compiler-based implementation. Our API gives the application developers the native C++ means (views and actions) to specify precisely which pattern compositions should be automatically fused during code generation into a single efficient GPU kernel, thereby ensuring a high target performance. We implement our approach by extending the range-v3 library which is currently being developed for the forthcoming C++ standards. The composable programming in our approach is done exclusively in the standard C++14, with STL algorithms used as patterns which we re-implemented in parallel for GPU. Our compiler implementation is based on the LLVM and Clang frameworks, and we use advanced multi-stage programming techniques for aggressive runtime optimizations. We experimentally evaluate our approach using a set of benchmark applications and a real-world case study from the area of image processing. Our codes achieve performance competitive with CUDA monolithic implementations, and we outperform pattern-based codes written using Nvidia's Thrust.

Details zur Publikation

Herausgeber*innenChen Q, Huang Z
BuchtitelProceedings of the 8th International Workshop on Programming Models and Applications for Multicores and Manycores
Seitenbereich58-67
VerlagACM Press
ErscheinungsortNew York, NY
StatusVeröffentlicht
Veröffentlichungsjahr2017 (05.02.2017)
Sprache, in der die Publikation verfasst istEnglisch
Konferenz8th International Workshop on Programming Models and Applications for Multicores and Manycores @ PPoPP 2017, Austin, Texas, undefined
ISBN978-1-4503-4883-6
DOI10.1145/3026937.3026942
Link zum Volltexthttp://dl.acm.org/authorize?N20051

Autor*innen der Universität Münster

Dirks, Hendrik
Professur für Angewandte Mathematik, insbesondere Numerik (Prof. Burger)
Gorlatch, Sergei
Professur für Praktische Informatik (Prof. Gorlatch)
Haidl, Michael
Professur für Praktische Informatik (Prof. Gorlatch)
Humernbrum, Tim
Professur für Praktische Informatik (Prof. Gorlatch)
Steuwer, Michel
Institut für Informatik