Gpu Kernel Baseliner is a C++ library to produce reliable and accurate execution time measurement for Cuda and Hip Kernels.
Baseliner helps developers understand the performance of their kernels in a controlled and easy to use environnement.
This library is still a Work In Progress, the user facing interfaces could be subject to change.
Baseliner is designed to answer specific performance questions:
- Regression Testing : Compare two versions of the same kernel on the same card.
- Hardware Comparison : Compare the execution of the same kernel across cards.
- Dual Support : Native support for both CUDA and HIP runtimes.
- Statistical Stability : Handles reruns and numbers of execution to produce reliable measurements.
- Low Overhead : Results are the closest possible to the real executions.
- Minimal Setup & Runtime Tuning: Designed for easy integration into existing C++ projects. Benchmark parameters can be adjusted at runtime, allowing you to modify test conditions without the need to recompile.
- C++ 17 or higher
- Cmake 3.15+
- Nvidia: CUDA Toolkit (11.0+)
- AMD: ROCm(5.2+)
The recommended setup is the highest CUDA or HIP version your device supports. Note: You need at least one of the GPU architectures to compile and use this library.
- nlohmann/json, To simplify saving settings and outputs, we use this json library, it is embedded into the library.
In the futur, the library will be available in binary form
You can fetch and build the library with the Cmake FetchContent to automatically download the library as a depedency. Example :
FetchContent_Declare(
baseliner
GIT_REPOSITORY https://github.com/comeyrd/gpu-kernel-baseliner.git
GIT_TAG v0.1
)
FetchContent_MakeAvailable(baseliner)
target_link_libraries(my_benchmark PRIVATE baseliner::baseliner)An example of the usage of Baseliner is in the using-baseliner repository.
In Progress...
Contributions are welcomed ! There should be some Issues tagged as "getting-started", start with that then we will chat to see what you can contribute on !