Skip to content

GPU Napkin Math v0.4.0

Latest

Choose a tag to compare

@gpu004 gpu004 released this 12 Oct 23:15
b09c64b

What's changed

  • Added napkin collective for AllReduce, AllGather, and ReduceScatter using committed NCCL Tests curves for two or eight H100s on NVLink. It reports latency versus bandwidth regimes, algorithm and bus bandwidth, and the evidence used. It rejects unmeasured configurations and extrapolation rather than scaling peer-copy or datasheet rates.
  • Added a tensor-parallel worked example that combines device work with measured collective costs. It shows why eight GPUs do not automatically give an eightfold speedup.
  • Recalibrated A100, H100, B200, and B300 with sustained GEMM rounds. Longer warm-up and timed rounds measure performance after the software power cap engages rather than short-lived boost rates.
  • Added per-round NVML clock, power, temperature, and clock-limit observations. Tables flag metrics whose rounds disagree by more than 5%; the spread is an observed range, not a confidence interval.
  • Corrected PCIe host-link reporting and recalibrated B300. Its GPU-side Gen6 link does not make host transfers Gen6: the measured CPU path is limited to Gen5 x16.
  • Added practice problems with worked solutions and checks that keep their teaching constants consistent with profiles and prices. README generation now accepts multiple Markdown files.
  • Added napkin validate and a generated validation report from committed H100 cases, raw Modal observations, and tolerances declared before the runs.

Validation findings and changed estimates

Existing estimates can change because the hardware profiles now use sustained measurements. The bundled measurements and NCCL curves were collected on Modal on 2026-10-12; their software and topology details are recorded with the evidence.

The validation report includes misses as well as successes:

  • The large BF16 GEMM agreed with its estimate within the declared tolerance.
  • The PCIe round trip was about 5.9 times slower than predicted despite matching the link generation. Host-transfer bandwidth needs measurement on the actual host; GPU model and PCIe generation alone are insufficient.
  • The eager PyTorch tiny-kernel loop was about 3.6 times slower than predicted. The Rust driver-launch constant excludes Python, framework, and CUDA runtime overhead, so it is a lower bound for that workload.

These findings do not make the estimator an end-to-end benchmark. Keep host, framework, topology, and workload assumptions attached to its predictions.

Install and try

Download and extract this release's source archive, then run from the project directory:

cargo install --path crates/napkin --locked
napkin collective --gpu h100 --count 8 --topology nvlink --op all-reduce --bytes 128KiB
napkin validate

Verification

CI passed for the release commit. All 105 local tests passed, generated README and practice-problem blocks were current, the validation report matched its committed inputs, and collective examples ran successfully. No additional GPU runs were performed while preparing this release.

Full changelog: v0.3.0...v0.4.0