ppbcc — Performance Portability, Benchmarking & Code Complexity

ppbcc — Performance Portability, Benchmarking & Code Complexity#

Python 3.12+ MIT License

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:

Indices and tables#