Log inStart free
LESSON 26.08 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Occupancy and register pressure

Watch registers decide how many warps an SM holds, and when that matters.


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/mo
EXPLAINER · 26.08 · SM BAYOCCUPANCY 75% · 6 OF 8 WARPS
01
Stage 1 of 6 · Warp slots
Each SM has 8 warp slots. 3 blocks of 2 warps fill 6, so occupancy is 75%.
Explain it simply

The strip at the top shows SM 0's 8 warp slots, like 8 seats in a small room. Each seat holds one warp, a group of 32 threads. 6 seats are taken, so the SM runs at 75 percent occupancy. The other 18 blocks below wait their turn.

SM 0 holds 6 warps in 8 slots: occupancy 75%. 24 blocks in all; 6 run at the start.

blocks, registersloadsissued instructions, occupancy, this settingstalls: waits, idle cycles, spillsempty slot, unused room
the warp slotsSM 0block 0warp 0block 0warp 1block 2warp 0block 2warp 1block 4warp 0block 4warp 1emptyemptyoccupancy = 6 / 8 warps = 75%3 blocks × 2 warps · set by the registers01234567891011121314151617181920212223frame 1frame 2frame 3frame 4starts on SM 0starts on SM 1waits24 blocks × 2 warps = 48 warps · 6 blocks run at the startthe warp slotsSM 0block 0warp 0block 0warp 1block 2warp 0block 2warp 1block 4warp 0block 4warp 1emptyemptyoccupancy = 6 / 8 warps = 75%3 blocks × 2 warps · set by the registers01234567891011121314151617181920212223frame 1frame 2frame 3frame 4starts on SM 0starts on SM 1waits24 blocks × 2 warps = 48 warps · 6 blocks run at the start
Toy: 26.C2 · 4 frames of the 20 × 12 blur · 2 SMs · a load waits 40 cycles here (26.06's HBM: 500)
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
occupancy=WactiveWmax⁡\sy{occ}{out}{\text{occupancy}} = \dfrac{\sy{w}{param}{W_{\text{active}}}}{W_{\max}}
occupancy=68=0.75\text{occupancy} = \dfrac{6}{8} = 0.75

Occupancy is the share of warp slots that hold a warp.

Common mix-ups

MYTHHigher occupancy always makes a kernel faster.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With 32 × 2 blocks and no cap, row by row reaches 100% occupancy. Is it faster than all 9 first?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

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.