ppbcc — Performance Portability, Benchmarking & Code Complexity#
ppbcc is the tooling half of a performance-portability study of GPU
programming paradigms. The benchmark implementations it analyses live in the
companion repository
performance-portability-benchmark,
which implements the same four algorithms — vector addition, matrix
multiplication, an n-body simulation, and a polyhedral gravity model — across
CUDA, HIP, SYCL, Kokkos, RAJA, Alpaka, OpenMP, OpenACC, OpenCL, Vulkan,
Boost.Compute, WebGPU, Slang, Metal, and stdpar.
This package provides four workflows:
Code complexity — Halstead and LOC/SLOC metrics for C++ and GPU-enriched C++. This part is stand-alone: it needs nothing but the source files you point it at.
Benchmarking — discover and run Google Benchmark executables and consolidate their JSON reports into one tidy CSV.
Kernel profiling — batch-run Nvidia Nsight Compute over the same executables and build a roofline model from the counters.
P3 analysis and plotting — application efficiency, performance portability, and five chart types that relate both to code complexity.
Credits#
The performance-portability metrics and the Cascade/Navchart layouts are inspired by the P3 Analysis Library by Pennycook et al. If you use this tool, please also have a look at their performance-portability analysis in published work, as this work builds upon theirs.
ppbcc rests on two bodies of work:
Code complexity — Halstead’s software science [Halstead1977], the basis of Code Complexity.
Performance portability — the \(\Phi\) metric and its visualizations [Pennycook2019] [Pennycook2021], the basis of P3 Analysis.
INSTALLATION & QUICK START