Zero Overhead Modern C++ For Mapping To Any Programming Model
Huebl, Axel, Alexander Matthes, Benjamin Worpitz, Erik Zenker, René Widera, Guido Juckeland, Michael Bußmann · Figshare · 2018
Towards exascale computing, today's HPC systems have become heterogeneous and diverse. Accounting for both host and accelerator, the TOP10 supercomputers in 11/2017 alone provided as much as 11 different computing architectures. On top of the hardware follow the accompanying programming models: from directive based, implicit and explicit descriptions up to task-based. Scientific code developers are facing a tough choice as commitment to a specific hardware and/or programming model narrows down potential target systems. With limited development resources but usually multi-decade long project lifetimes, maintaining multiple implementations of the same algorithms to widen platform support is unfeasible for most teams. Alpaka is a standard C++, compile-time meta-programming library providing a unified, explicit, parallel programming model. On typical MPI+X parallelized applications, Alpaka enables developers to describe shared-memory, in-node parallelism. Zero-overhead abstraction is achieved by compile-time specializing C++ templates to native backends (e.g. CUDA, OpenMP, TBB, ...). Alpaka stays with modern C++ as a standardized, widely supported language without introducing pre-processor or pragma-based annotations to the user directly. It naturally allows inlining, kernel fusion and code-reuse on a single-source programming paradigm. With such, abstractions and control within the final software stack are achievable without duplicating implementations leading to a maintainable code base even for large applications.