LESSON 27.C2 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
The GEMM optimization ladder
Watch one 64 × 64 matmul climb six rungs, from 62 to 712 GFLOP/s.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 27.C2 · GEMM BAYRUNG 1 OF 6 · 8,448 NS · 62 GFLOP/S
01
Stage 1 of 6 · 64 GEMVs
Run C = A · B as 64 GEMVs, one per column of B. Each GEMV reads all of A again.
Explain it simply
You see A, B and C in HBM, the GPU's main memory. A GEMV multiplies A by one column of B, so 64 columns need 64 GEMVs. Each one reads all of A again. The math units sit idle most of the time, waiting for bytes.
Rung 1 of 6: 64 GEMVs take 8,448 ns, 62 GFLOP/s. HBM sets the time.
bytes and copiesmath and speedstalls and waitsA, peaklatency, idle time
Toy: a 64 × 64 FP16 matmul on a 4-SM toy GPU
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each GEMV takes the longer of its memory time and its math time.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 2 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.