SkePU Tutorial at ACM PPoPP'21 Conference, 27 Feb. 2021
Portable Programming of Heterogeneous Parallel Systems with SkePU
Linköping University, Linköping, Sweden
SkePU is a C++ based open-source framework for high-level portable programming of heterogeneous parallel systems using algorithmic skeletons. Skeletons are generic programming constructs based on higher-order functions, such as map, stencil, reduce, scan, that implement algorithmic patterns for which platform-specific parallel implementations may exist. Skeletons provide a high degree of abstraction and portability with a quasi-sequential programming interface, as their implementations encapsulate all low-level and platform-specific details such as parallelization, synchronization, communication, memory management, accelerator usage and other optimizations.
From the same high-level source code using SkePU skeletons and data-containers, the framework generates target code for multicore CPU execution, CUDA and OpenCL code for execution on GPU and multi-GPU systems (and other OpenCL devices such as Xeon-Phi), hybrid CPU-GPU execution, and on HPC clusters. SkePU transparently performs a number of run-time optimizations, including data transfer minimization, data locality optimizations and auto-tuned back-end selection.
The SkePU framework is organized as an include-only template library plus a light-weight pre-compiler based on LLVM clang; the cluster backend uses the MPI support in the StarPU runtime system. The development of SkePU started in 2010, and we recently presented the third generation of the framework. Beyond cooperative research projects such as H2020 EXA2PRO, we use SkePU since several years as a lab environment for teaching high-level parallel programming in our master-level course on multicore and GPU programming at Linköping University, Sweden.
In this tutorial we present SkePU with its skeletons and data-container types, guide participants through some hands-on programming exercises in SkePU, and also point out some of the more recently added new features such as multi-variant user functions (which can be used by platform expert programmers to exploit e.g. custom SIMD instructions without compromising the portability of the SkePU program). The source code of SkePU is available at skepu.github.io; for fast installation we also provide a binary distribution of SkePU for x86-64 Linux.
The objective of this tutorial is to provide a good overview of the capabilities and ease of use of SkePU to potential users in industry and academia, as well as to researchers and teachers in the PPoPP scientific community.
Contents / Schedule
Introduction to parallel programming patterns and skeleton programming in general (ca. 30min, C.K.)
Overview of SkePU (fundamental concepts including code examples): skeletons, data-containers and container proxies, backends, managed and unmanaged scopes, memory coherence management and I/O encapsulation, SkePU framework structure (ca. 45min, A.E./C.K.)
Coffee break and help with installation where required (A.E., J.A.)
Walk-through of a complete SkePU example (ca. 30min, A.E., J.A.)
Advanced issues in SkePU: backend selection tuning, multi-return, multi-variant user functions for custom SIMDization. Optimizations in SkePU. (ca. 45min, C.K., A.E.)
Another hands-on programming exercise, as far as time permits. (A.E., J.A.)
General interest and some background in parallel and heterogeneous computing (this should be no problem for anyone attending PPoPP).
For the programming exercises, some background in modern C++ and programming under Linux.
SkePU runs under Linux. We encourage participants to bring their laptop for hands-on programming in SkePU, and we try to help with installation issues if there should be any.
We will also demo some examples on screen for all participants who prefer not to try it out immediately.
We encourage participants to install SkePU before the tutorial so we can make better use of the time. Detailed instructions will follow.
About the Organizers
Christoph Kessler is a professor for Computer Science at Linköping University, Sweden, where he leads the Programming Environment Laboratory's research group on compiler technology and parallel computing. His research interests include parallel programming models, compiler technology, code generation, combinatorial optimization, and software composition/synthesis. He has published two books, several book chapters and more than 120 scientific papers in international peer-reviewed journals and conferences.
August Ernstsson, Tek.Lic., M.Sc. in computer engineering, is a final-year PhD student at Linköping University and the main developer of SkePU since 2016. He has published 5 articles about his work on SkePU in international peer-reviewed journals and conferences. He recently defended his Licentiate thesis about the SkePU 3 design. His main research interests are in high-level parallel programming interface design targeting multi-core heterogeneous systems and clusters. His recent work concerns how modern C++ can be leveraged and adapted to fit this purpose.
Johan Ahlqvist is a research engineer in the SkePU development team at Linköping University. His research interests are in parallel computing, advanced C++ and compiler technology. He has developed the cluster backend for SkePU atop StarPU-MPI and the SkePU plug-in to the Mercurium compiler framework.