LESSON 32.01 · 5 STAGES · 2 CONTROLS · 2 CHECKSPRO · PREVIEW
Graph optimizations
Watch two compiler passes remove 5 of 13 kernels from a traced model block.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 2 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 32.01 · COMPILER BAY13 KERNELS · 293.8 µs PER CALL
01
Stage 1 of 5 · Traced graph
A tracer records the MLP block as 13 nodes. Each node runs as one GPU kernel on every call: 293.8 µs.
Explain it simply
A tracer runs the model once and writes down every operation as a box, joined by arrows. Each box becomes one GPU kernel, a small program the GPU starts on every call. The bar at the bottom is one call, and each piece is one kernel. All 13 together take 293.8 microseconds.
A graph of 13 nodes from input x to out. A bar below shows one call: 13 kernels, 293.8 µs in total.
input x, activationsweights, constantskernels, timesremoved work
Toy: one MLP block, 13 nodes, a rounded H100-like GPU
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A call takes the sum of its kernel times.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 2 live controls
- 2 mix-up cards and 2 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.