LESSON 27.09 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
GEMM vs GEMV
Watch one matrix meet one vector, then 64 vectors, and see the speed change.
Needs27.08 Kernel fusion
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 27.09 · GPU BAY1 GEMV · 8,192 FLOPS
01
Stage 1 of 5 · One vector
A GEMV multiplies the 64 × 64 matrix A by one vector x. Each row of A gives one value of y.
Explain it simply
A GEMV is a matrix times one vector. Each row of A meets x, and their 64 products add up to one value of y. When a language model writes one token for one user, its layers do GEMVs like this.
The 64 by 64 grid A, the column x and the column y. y fills from top to bottom; the first value is minus 3.328125. The GEMV does 8,192 FLOPs.
weights Ainputs x and B, memory timeoutputs y and C, math timecolumns not used yet
Toy: the 64 × 64 matmul of 27.C2 on a toy GPU (64 GB/s, 512 or 4,096 GFLOP/s)
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each value of y is one row of A times x.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 3 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.