CUDA Training — 3일, 11편, vector_add에서 Flash Attention까지
3일, T4·L4 위에서 남긴 커널 9개와 벤치 70여 개. 전 과정을 처음부터 끝까지 복원한 11편짜리 시리즈다.
숫자로 본 결과
- 9개 — CUDA / Triton 커널
- 4.79× — Flash Attention speedup (N=4096, T4)
- 65× — HBM 트래픽 절감
- 54 TFLOPS — Triton fp16 matmul
- 0.86× — cuDNN FA-2 대비 (L4, 300줄 Triton)
구성
PART I · Memory — vector_add, pageable vs pinned PART II · Parallelism — reduction, matmul PART III · Fusion & Attention — softmax fusion, Flash Attention capstone PART IV · Integration — PyTorch custom op, Triton 포팅, MHA causal FA PART V · Essays — Triton vs CUDA, 300줄의 비밀
디자인·조판을 유지하려고 블로그 본문에 풀어놓는 대신 별도 포털로 묶었다.