alpaka – Abstraction Library for Parallel Kernel Acceleration

Posted in C++ by - September 15, 2024
alpaka – Abstraction Library for Parallel Kernel Acceleration

The alpaka library is a header-only C++17 abstraction library for accelerator development.

Its aim is to provide performance portability across accelerators through the abstraction (not hiding!) of the underlying levels of parallelism.

It is platform independent and supports the concurrent and cooperative use of multiple devices such as the hosts CPU as well as attached accelerators as for instance CUDA GPUs and Xeon Phis (currently native execution only). A multitude of accelerator back-end variants using CUDA, OpenMP (2.0/5.0), std::thread and also serial execution is provided and can be selected depending on the device. Only one implementation of the user kernel is required by representing them as function objects with a special interface. There is no need to write special CUDA, OpenMP or custom threading code. Accelerator back-ends can be mixed within a device queue. The decision which accelerator back-end executes which kernel can be made at runtime.

The abstraction used is very similar to the CUDA grid-blocks-threads division strategy. Algorithms that should be parallelized have to be divided into a multi-dimensional grid consisting of small uniform work items. These functions are called kernels and are executed in parallel threads. The threads in the grid are organized in blocks. All threads in a block are executed in parallel and can interact via fast shared memory. Blocks are executed independently and can not interact in any way. The block execution order is unspecified and depends on the accelerator in use. By using this abstraction the execution can be optimally adapted to the available hardware.

Software License

 

alpaka is licensed under MPL-2.0.

Documentation

GitHub

The alpaka documentation can be found in the online manual. The documentation files in .rst (reStructuredText) format are located in the docs subfolder of this repository. The source code documentation is generated with doxygen.

This post was written by

Leave a Reply

Your email address will not be published. Required fields are marked *

Please enter and activate your license key for Cryptocurrency Widgets PRO plugin for unrestricted and full access of all premium features.