LESSON 27.16 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
GPU reductions and warp shuffles
Watch a block of values become one sum, through shared memory and warp shuffles.
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.16 · WARP BAY64 THREADS · 2 WARPS · SUM 272
01
Stage 1 of 6 · One value each
A thread block of 64 threads holds one value per thread. A reduction combines all 64 values into one sum.
Explain it simply
Each small box is one thread's value, a digit from 0 to 9. The block has 64 threads in 2 warps of 32. You want one number from all of them: the sum. A reduction is any job like that, where many values become one.
Warp 0 shows 32 boxes, one per thread. 1 more warp shows below it.
thread valuesstride or offsetbarrier (all threads wait)partial and final resultslane not used
Toy: one block of 32 to 128 threads, one seeded digit each
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The result combines every thread's value with one operation.
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.