Skip to content

feat(profiles): Calibrate A100, H100, B200, B300 with napkin-bench - #19

Merged
devin-ai-integration[bot] merged 4 commits into
mainfrom
devin/1791826952-calibrate
Oct 12, 2026
Merged

devin-ai-integration[bot] merged 4 commits into
mainfrom
devin/1791826952-calibrate

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

This is the first run of the Rust napkin-bench on real GPUs (Modal A100-80GB:2, H100!:2, B200:2, B300:2; full 7-round runs). It replaces the August PyTorch numbers and adds the first measured B200/B300 numbers. Every committed run passes every check.

HBM GB/s BF16 TFLOP/s GPU↔GPU GB/s H2D/D2H GB/s PCIe
A100 1738 265 275 26/26 Gen4 x16
H100 3003 734 395 55/55 Gen5 x16
B200 6322 1585 766 56/57 Gen5 x16
B300 6487 1823 765 55/57 Gen6 x16

Bench bugs found on hardware:

  • Peer copies were host-staged, at about 37 GB/s instead of NVLink speed. cudarc's stream.alloc takes memory from the cuMemAllocAsync default pool. cuCtxEnablePeerAccess doesn't cover pool memory, so cuMemcpyPeerAsync silently went through the host, and cuMemcpyDtoDAsync over UVA returned INVALID_VALUE. Peer buffers are now cuMemAlloc memory (PeerBuffer, RAII). cuMemPoolSetAccess also fixed the copy, but it made the later tf32 GEMM run out of memory. A new check, g2g_faster_than_host (g2g > h2d), fails any future run where the copy falls back to the host path.
  • Event timing: ctx.new_event(None) disables timing. Events are now created with CU_EVENT_DEFAULT and synced on the stream.
  • Modal launcher: removed serialized=True (the remote couldn't import the module), passed --gpu-request through, and surfaced napkin-bench stderr on failure.

Host-link bandwidth depends on which Modal host the job lands on: H100 measured 56 GB/s in one run and 28 GB/s in the next, and A100 was 12–13 GB/s on some hosts. Measured gains four flat Option<u8> fields, pcie_gen, pcie_gen_max, pcie_width and pcie_width_max, all serde(default) so old JSONs still parse. They are sampled from nvidia-smi right after the h2d/d2h loop. A check, pcie_full_link (current == max), rejects runs on a degraded link. B300 needed 3 attempts because gpucurrent=6 while gpumax=5 on two hosts. The README provenance paragraph now states each GPU's link.

Open observation: B300 reports Gen6 x16 but still moves only about 56 GB/s host↔device, so something other than the link appears to cap it. Not investigated.

Link to Devin session: https://app.devin.ai/sessions/35bf1a0a9fbd4f468393e25a9949f875
Open in Devin Desktop: https://app.devin.ai/desktop/session/35bf1a0a9fbd4f468393e25a9949f875?variant=devin
Requested by: @gpu004

Awesome stuff and others added 4 commits October 12, 2026 17:43
napkin-bench: create timing events with CU_EVENT_DEFAULT (cudarc's None defaults to DISABLE_TIMING, breaking cuEventElapsedTime), synchronize via the stream, and call elapsed directly; modal/bench.py: drop serialized (remote module import fails), pass --gpu-request through, surface napkin-bench stderr.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot merged commit 1bdfaae into main Oct 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant