LESSON 27.11 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Shared-memory bank conflicts
Watch 32 threads queue at one bank, then spread out.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 27.11 · KERNEL BAYSTRIDE 16 WORDS · PAD 0 B
01
Stage 1 of 5 · The banks
Shared memory has 32 banks of 4 bytes. One row of A fills 16 banks, so two rows share one line.
Explain it simply
Think of the 32 banks as 32 checkout lanes, each one 4 bytes wide. A word goes to bank number word mod 32, so the words wrap around the banks line by line. Each row is 16 words long, so two rows share a line, and every second row starts at bank 0.
A grid of 32 bank columns holds the FP16 tile of A: 16 words per row, 0 of them padding.
A tile (weights)B values, memory timeconflict, extra cyclesmath time, speedpadding word
Toy: the 27.C2 GEMM, a 32 × 32 tile of A, 32 banks of 4 bytes
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The bank is the number of the word for row i, column c, mod 32.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 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.