LESSON 27.18 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Fused LayerNorm and RMSNorm kernels
Watch one kernel add, normalize and scale a token's row in one HBM trip.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 27.18 · NORM BAYRMSNORM · FUSED ADD + NORM
01
Stage 1 of 6 · Rows in HBM
The residual stream x and the attention output a sit in HBM as FP16. The weights γ wait beside them.
Explain it simply
The bottom band is HBM, the GPU's big main memory. It holds the token's running vector x and the attention output a. The middle band is one SM with eight empty lanes, and every trip between the bands costs time.
HBM holds x, a and the weights, 8 values each. The 8 register lanes are empty. 1 kernel chip waits on top.
x, a, h and the statisticsweights γ, βnormalized output yextra HBM trips, overflowempty or not stored
Toy: the 27.C3 token's norm before the MLP; 8 lanes per block
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each row holds 8 FP16 values of 2 bytes.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 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.