GPU architecture / Module 3 · Lesson 1 companion
Inside the GPU.
Follow one output.
Give one output a home. Follow its work through a thread, a block, a warp, and finally the hardware that runs it. This is the same example and order as lesson 3.1: 1,000 outputs, 128 threads per block, output 999.
← Return to GPU execution lesson01 / 05
Start with one output
A matrix multiplication produces many numbers. Choose one output; keep following that same number as the view changes.
Output 999 → row 99, column 9
Under the magnifying glass
The selected output
Every cell has an address. The same cell stays selected as we reveal how its work is organized.
Change the work, watch the grouping
Same chip. Different launch.
A kernel is the GPU function launched for this job. The grid is all its blocks. These settings change the grid, not the four illustrated SMs.
1,000 outputs → 8 blocks of 128 threads. 24 extra threads are guarded: they skip the calculation and store.
Model boundaries
This is a one-thread-per-output indexing example. Optimized matrix kernels can distribute work differently and use tensor cores. The four-SM cutaway is an illustration, not a specific GPU. Tiles drawn on its die are SMs, not individual CUDA cores.
Each block is assigned wholly to one SM. One SM can host several blocks when resources permit. The placement steps show one possible assignment; they do not predict order, duration, concurrency, occupancy, or throughput. Earlier placements remain drawn for tracking, without a claim that they are simultaneous.
A warp is 32 consecutive threads of one block that run one instruction together; a lane is a thread’s position 0–31 in that warp. Thread and warp labels describe work. A thread is not a dedicated physical core. A guard checks that an output exists before a thread reads inputs or writes a result.
Reference: NVIDIA CUDA Programming Guide. Numerical row/column inputs here are invented teaching values: teaching numbers, not measurements. No GPU executes this page.