From Scratch: Building B200 Attention Kernel to 94.4% of FA4 with 60 Diagrams
JosephJacks_ · x · 2026-08-29
A deep dive into building B200 attention kernels from scratch using CUDA and PTX.
- Goal: Optimize from a naive baseline to achieve 94.4% of FlashAttention-4 (FA4) performance.
- Content: Features 14 kernel iterations and 60 diagrams to visualize each optimization step.
- Progression: Introduces one major optimization at a time (e.g., memory coalescing, Shared Memory, Tiling), pairing concepts with code.
- Application: The final optimized kernel is integrated and tested within a video-generation model.
More from Infra
- Google Colab hands users a G4 Blackwell GPU, user reports — MickeySteamboat · 2026-11-30
- 19 GitHub Actions Runner Providers Benchmarked: Speed and Cost, Updated Weekly — DanielLockyer · 2026-11-30
- Learn Inference: An Interactive Guide to Serving Generative Models in Production — attentionmech · 2026-11-30
- open-daytona: rootless gVisor sandbox pool runs 1,536 concurrent agent-RL sandboxes on Slurm — victor_explore · 2026-11-30
- Notes on 'Looking Back at Postgres': Extensibility, No WAL, Open Source — sh_reya · 2026-11-30
- NRDC concedes BAAJA makes data centers pay grid costs, countering 'giveaway' claim — zacharynado · 2026-11-30