CUDA exercises from Programming Massively Parallel Processors (PMPP), with correctness tests (GoogleTest) and benchmarks against optimized libraries (Google Benchmark + Thrust/cuBLAS).
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)ctest --test-dir build --output-on-failure./build/exercises/bench_vecadd- Create
exercises/name/with:name.cuh— your kernel implementationtest_name.cu— correctness tests (GoogleTest)bench_name.cu— benchmarks vs optimized library
- Add
add_exercise(name)inexercises/CMakeLists.txt
common/ Shared utilities (error checking, timing, device helpers)
exercises/
vecadd/ Vector addition — kernel, test, benchmark
...