BenchLab is a modular GPU benchmarking suite written in C++ using both CUDA and HIP backends. It provides comparative performance benchmarks for common GPU operations across NVIDIA and AMD GPUs.
- Unified interface for HIP (AMD) and CUDA (NVIDIA)
- Modular benchmarks:
- Vector Addition
- Matrix Multiplication
- 1D Convolution
- Reduction (Sum)
- Memory Bandwidth Test
- CMake ≥ 3.10
- A supported compiler (GCC, Clang, or MSVC)
- For CUDA backend:
- NVIDIA GPU with CUDA Toolkit installed
- For HIP backend:
- AMD GPU with ROCm installed
Use the provided build.sh script:
# Build for CUDA
./build.sh -f --backend=CUDA
# Build for HIP
./build.sh -f --backend=HIP
# If you don't provide the backend, it will choose the backend based on installed drivers
./build.sh -fOr build manually with Cmake:
# CUDA
cmake -DENABLE_CUDA=ON -DENABLE_HIP=OFF -B build
cmake --build build -j
# HIP
cmake -DENABLE_CUDA=OFF -DENABLE_HIP=ON -B build
cmake --build build -j./build/run_benchmarks