LESSON 26.C1 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
CPU vs GPU on the same workload
Watch one vector job race on a CPU and a GPU.
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 · 26.C1 · RACE BAY12 B · 1 OP AN ELEMENT · 2 PASSES
01
Stage 1 of 6 · One workload
Both machines add, then multiply, two vectors of 1,024 floats. Each element moves 12 bytes for 1 operation.
Explain it simply
You see two machines and one job. The job reads a and b and writes c, then reads them again and writes d. Each element needs one operation, but three trips to memory of 4 bytes each. The teal strips show a and b in the CPU's RAM only.
A CPU and a GPU, each with its memory levels. Vectors a and b sit in CPU RAM. Each element moves 12 bytes for 1 operation.
a, blanes, links, math timewaits: memory, copiesresults, pass timelaunch, unused, not written yet
Toy: c = a + b, then d = a · b, 1,024 floats
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Operations done for each byte moved.
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.