LESSON 27.04 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
A CUDA kernel launch
Watch a vector add copy its data to the GPU, run, and come back.
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 · 27.04 · LAUNCH BAY16 VALUES · 64 B PER ARRAY
01
Stage 1 of 5 · Two memories
The host holds a and b in RAM, 16 values each. The GPU's device memory is still empty.
Explain it simply
On the left is the host, the CPU with its own memory. Arrays a and b live there, one cell per number. On the right is the GPU, the device. It has a separate memory, like a second desk, and that desk starts out empty.
Two boxes. The host box holds arrays a and b with 16 values each, and an empty array c. The device box holds three empty arrays and 2 SMs.
a and bthreadsc and the kernelempty or idle
Toy: a vector add on a toy GPU; ticks, not real times
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each array takes 4 bytes per value.
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.