LESSON 27.15 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Triton's block programming model
Watch one Triton kernel add two vectors, a whole block at a time.
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.15 · KERNEL BAYN 20 · BLOCK 8 · 3 PROGRAMS · 4 LANES OFF
01
Stage 1 of 6 · Add two vectors
Vector addition adds x and y at each position. The 20 sums go into out.
Explain it simply
You see two rows of 20 digits, x and y. Vector addition adds the two digits at each position. The sum goes into the row out, which starts at zero. Every position works on its own, so all of them can run at the same time.
Rows x and y hold 20 digits each. Row out holds zeros.
x, yprograms, offsetsoutpast the endmasked lane, or past N
Toy: seeded digits in a flat toy memory; programs run in pid order
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each output value is the sum of x and y at one position.
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.