Beating cuBLAS by 4.7%: NVFP4 Kernels Hand-Built on GB300, 100% Claude-Generated
pranjalssh · x · 2026-08-16
Two years ago, the author entered the GPU world with a blog on outperforming cuBLAS on the H100 — a post that unexpectedly sparked a mini wave of hand-written Blackwell kernels: others reached 99% of cuBLAS with MXFP8, beat it with BF16, and the Modular team did it too. Now he's back with a sequel: an NVFP4 GEMM built from scratch on a GB300 node (CUDA 13.1) in plain CUDA plus inline PTX, with no framework dependency.
- Beats cuBLAS by 4.7% on the classic 8192×8192×8192 shape, with results on several other shapes; all code is open-sourced on GitHub.
- NVFP4 was chosen because it's the hardest dtype: as tensor-core instructions get faster, the bottleneck shifts to feeding the pipeline, which is where the most extreme GPU performance tricks shine.
- This time the author has something better than Hilbert curves, an approach that exactly fits NVIDIA's hardware layout.
- The entire kernel is 100% generated by Claude (details to follow).
He hopes this motivates people to own their kernels as ordinary code rather than treating them as black boxes.
More from Infra
- If You Believe in Short AGI Timelines, Now's the Time to Sign a 5-Year Contract for Nvidia B300 Clusters — felix_red_panda · 2026-08-16
- How an 8B Model Shrinks from 16GB to 4GB: Understanding Quantization — techNmak · 2026-08-16
- Optimizing API costs by enabling gzip compression — DanielLockyer · 2026-08-16
- Performance cliff in Qwen3.8-27B KV quantization on 16GB VRAM — Unnamed-3891 · 2026-08-16
- Nvidia's massive financing turns CUDA software support into hardware collateral — aronchick · 2026-08-16
- Developers enter the $0 cost per task era as inference prices plummet — DynamicWebPaige · 2026-08-16