LESSON 26.10 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
GPU synchronization
Watch 8 GPU threads add 8 numbers, with and without a barrier.
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 · 26.10 · SYNC BAY8 THREADS · WARP 3 2 CYCLES LATE
01
Stage 1 of 5 · Store to shared
Each thread writes its value x to shared memory. warp 3 starts 2 cycles late.
Explain it simply
You see 8 threads in 4 warps. A warp is a group of threads that run each step together. Each thread copies its number into shared memory, the fast memory that the block shares. Warp 3 waits for a slow load, so it starts 2 cycles late.
Eight threads store their values 4, 8, 9, 6, 5, 7, 2, 3 in shared memory. Warp 3 stores 2 cycles late.
stored valuessumsbarrierstalls, stale reads, lost addsno work, or never happens
Toy: 1 block, 8 threads, warps of 2 (a real warp has 32)
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each thread t copies its value into slot t.
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.