
Why GPUs are built for throughput
3 min readNow we open the GPU itself, the engine inside the Jetson Orin Nano used throughout this module. This lesson answers why a GPU trades per-thread speed for throughput and how a CUDA kernel is organised into grids, blocks and threads.
Two numbers describe any processor's personality: Throughput is how many operations complete per unit of time. and latency. Latency is the time one operation takes from start to finish. The two pull in opposite directions, and every chip is a compromise between them. A processor built to reduce latency spends its transistors on prediction and caching. A processor built to raise throughput spends them on arithmetic units instead.
A CPU core is a latency machine. It has a handful of large cores, each with out-of-order execution, branch prediction, speculative execution and several levels of big cache. All of that machinery keeps one instruction stream moving without waiting. The price is die area: on a modern CPU, a large fraction of the core is control logic and cache, not arithmetic.
A GPU makes the opposite bet. It contains thousands of small, simple cores. They issue instructions in order. They have no branch prediction and no speculative execution, and their caches are small. Instead of spending silicon on guessing, the GPU spends it on one thing that always works for parallel work: many independent hardware threads. When one thread stalls, the hardware switches to another thread that is ready. The stall is hidden, not avoided.
Why does this win? Because the workloads a GPU runs, graphics and dense numerical computing, expose millions of independent pieces of work: pixels, matrix elements, particles. Total throughput dominates, and the latency of any one operation barely matters. A single GPU thread is much slower than a CPU core at a serial task, but the GPU runs so many of them that the total work finished per second is far higher.
Keep one sentence for the rest of this module: a GPU never tries to make one thread fast. It tries to keep thousands of threads busy at once. Every design decision after this follows from that one sentence.
An SM issues instructions in order and does not predict branches. There is nothing to mispredict and no misprediction penalty. The flip side is that the SM depends entirely on having other ready warps to hide every stall.
A short history: from shaders to CUDA
3 min readThe first GPUs were fixed-function. The NVIDIA GeForce 256, released in 1999, popularised the name "GPU", but it could only run the hard-coded steps of the 3D graphics pipeline: transform vertices, light them, rasterise triangles, shade pixels. You could not write your own program for it.
That changed in 2001 with the GeForce 3, which introduced programmable vertex and pixel shaders. For the first time, developers wrote small programs that ran on graphics hardware. Researchers immediately started bending shaders to do non-graphics work, a practice called general-purpose GPU computing, or GPGPU. In 2004 the Brook project at Stanford, led by Ian Buck, showed how to compile C-like programs for the GPU.
The turning point came in 2006. NVIDIA's G80 architecture, in the GeForce 8800 GTX, replaced separate vertex and pixel units with one unified shader array: a large grid of programmable cores that could run any workload. That same year NVIDIA announced CUDA, a C extension that let programrs address those cores directly without pretending to draw triangles. CUDA 1.0 shipped in 2007. The SIMT execution model at the heart of the G80 was designed by John Nickolls and his team; the term "warp", borrowed from weaving, is his.
Each architecture generation carries a Compute capability is a major.minor version number that identifies a GPU architecture and the features it supports. The major number is the core architecture; the minor number marks an incremental revision. Kepler was 3.x (2012), Maxwell 5.x (2014), Pascal 6.x (2016), Volta 7.0 (2017), Turing 7.5 (2018), Ampere 8.x (2020) and Hopper 9.0 (2022). Blackwell arrived as 10.x in data-centre parts (2024) and as 12.x in consumer parts. The mapping is not perfectly clean: Ada Lovelace, marketed as its own architecture, is 8.9, one minor step past Ampere's 8.6 and 8.7. Two Volta-era additions matter for everything that follows. Tensor cores, specialised units for matrix multiply, drive deep learning. Independent thread scheduling changed how warps handle branching, and we return to it.
Where is this used today? GPUs accelerate machine-learning training and inference, scientific simulation, video encoding and graphics in data centres. In embedded products they run computer vision and AI inference at the edge: the NVIDIA Jetson family, system-on-modules built on the Tegra SoC, powers robotics, drones, smart cameras and automotive driver assistance. Arm's Mali GPUs sit inside billions of phones, and VideoCore drives the Raspberry Pi. The newest member, Jetson Thor (2025), uses a Blackwell GPU for humanoid robots; this module works with the more affordable Jetson Orin Nano (Ampere), whose GPU we dissect in detail. The next lesson covers Mali, VideoCore and the other embedded GPUs.
An embedded engineer cares about this history because the architecture that filled a data-centre GPU in 2016 now fits in a module that runs on a few watts. The abstractions did not change. Only the scale did.
The execution model: grids, blocks, threads and kernels
2 min readA A kernel is a function that the host launches to run many times in parallel on the device, once per CUDA thread. It looks like ordinary C++ and is marked with __global__. The launch uses triple angle brackets to state how the threads are organised:
__global__ void VecAdd(float* A, float* B, float* C)
{
int i = threadIdx.x;
C[i] = A[i] + B[i];
}
int main()
{
int N = 1024;
VecAdd<<<1, N>>>(A, B, C); // one block of N threads
}
The three built-in variables threadIdx, blockIdx and blockDim tell each thread where it sits. Threads are grouped into a A thread block is a group of up to 1024 threads that run on the same streaming multiprocessor and can synchronise and share memory. A grid is the set of all blocks in one launch. For a problem bigger than one block, each thread computes a global index:
__global__ void MatAdd(float A[N][N], float B[N][N], float C[N][N])
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
int j = blockIdx.y * blockDim.y + threadIdx.y;
if (i < N && j < N)
C[i][j] = A[i][j] + B[i][j];
}
int main()
{
dim3 threadsPerBlock(16, 16); // 256 threads per block
dim3 numBlocks(N / 16, N / 16); // enough blocks to cover N x N
MatAdd<<<numBlocks, threadsPerBlock>>>(A, B, C);
}
This organisation exists for a reason. Threads within one block are guaranteed to be co-scheduled on the same streaming multiprocessor, so they can share fast on-chip memory and synchronise with the __syncthreads() barrier. Blocks, by contrast, must be able to run in any order, in parallel or in series. That independence is what lets the hardware scale a program from one SM to dozens without you doing anything: when a block finishes, the scheduler loads a new block onto the vacated SM.
Two rules fall out of this. First, a block must fit entirely on one SM, so a block holds at most 1024 threads. Second, threads in different blocks can only communicate through slow global memory, which is why you keep cooperating threads together in one block.
Make the number of threads per block a multiple of 32. As the next sections show, the hardware executes threads in groups of 32, and a block that is not a multiple of 32 wastes lanes in its last warp.
Key takeaways
- A GPU spends its transistor budget on thousands of simple, deeply multithreaded cores, not on branch prediction or big caches.
- A kernel is a __global__ function launched with triple angle brackets; each thread locates its data with threadIdx, blockIdx and blockDim.
- Threads in one block are co-scheduled on the same streaming multiprocessor and can synchronise with __syncthreads(), while blocks may run in any order.
- Fixed-function graphics hardware became programmable general-purpose computing when the unified G80 shader array and CUDA shipped in 2006.
Reflect
- Explain to a colleague, in two sentences: explain why a GPU trades single-thread latency for massively parallel throughput
- Which objective are you least sure about? Re-read that section.