Why this one chip matters so much
Every time an AI model answers you, millions of small multiplications happen in a fraction of a second. In Part 1 we saw that a model produces its answer one token (a word or piece of a word) at a time, and that each token needs the model's billions of numbers, its weights. Something has to do all that arithmetic, fast, for millions of people.
That something is almost always a GPU, a graphics processing unit. It was built to draw video game graphics. Today it is the engine of AI: training models, and running them.
To see why, we first need to understand the chip you already know, the CPU (central processing unit), and what it was designed for.
In the stadium
Picture two ways to mark a mountain of exam papers. Hire a few brilliant professors, or fill a stadium with thousands of students who each know a little arithmetic.
In the silicon
A CPU has a few very powerful cores. A GPU has thousands of simpler ones. Which is better depends entirely on the kind of work.
What a CPU is brilliant at
A CPU is designed to finish one task, as fast as possible. The time it takes to finish one task is called latency, and CPUs are latency champions. They get there with a few tricks, all of which take up a lot of the chip:
- Big caches. A cache is a small, very fast memory right next to the core that keeps recently used data close, so the core rarely waits for the slower main memory.
- Branch prediction. Programs are full of "if this, then that". The CPU guesses which way each "if" will go and starts work early. When it guesses right, which is most of the time, no time is lost.
- Out-of-order execution. If one instruction is stuck waiting, the CPU looks ahead and runs later instructions that do not depend on it.
- High clock speeds. Each core does each step very quickly.
This is why your laptop feels snappy: opening apps, running a web browser, an operating system juggling many small different jobs. Each job is different, full of decisions, and needs answering now.
In the stadium
A professor can solve a hard, twisty problem quickly, keeps their favourite notes on their own desk, and can guess which page you will ask about next. But there are only a handful of professors.
In the silicon
A CPU core spends most of its transistors on caches and control logic that make one stream of instructions fast. Even the biggest server CPUs have a couple of hundred cores: AMD's newest EPYC tops out at 256. Not thousands.
Now give the professors a different job: add 1 to each of 8 million numbers. No decisions, no twists, just the same tiny step, millions of times. The professors' clever tricks do not help much here. What would help is more hands.
The GPU's big bet: throughput
A GPU makes a different bet. Instead of finishing one task fast, it tries to finish as many tasks as possible per second. That is called throughput.
NVIDIA's own programming guide puts it plainly: the GPU is designed so that more transistors are devoted to data processing rather than data caching and flow control. Fewer clever tricks per core, many more cores.
Each GPU core is slower and simpler than a CPU core. But when the work is thousands of identical little jobs, being wide beats being fast. Try it:
CPU 8 fast cores · 1 tick per job
0 ticks
GPU 1,024 slow lanes · 4 ticks per job
0 ticks
4,096 independent jobs, like 4,096 pixels. Press Play.
In the stadium
Ask the stadium to add up 4,096 separate receipts and they finish in moments, each student doing one. Ask them one long riddle where every clue depends on the last, and the professor wins.
In the silicon
GPUs win on data-parallel work: the same operation on lots of independent data. CPUs win on sequential work, where each step depends on the one before.
From pixels to AI
Why did anyone build such a chip? Graphics. A modern screen has millions of pixels, and a game redraws all of them many times a second. Each pixel's colour can be worked out mostly on its own, with the same steps as its neighbours. That is the perfect stadium job.
For years GPUs could only do graphics. Researchers who wanted their raw arithmetic power had to disguise their maths as pictures. In 2006, NVIDIA introduced CUDA, a way to program its GPUs for general computing in a C-like language, starting with the GeForce 8800 generation. Suddenly the stadium could be hired for any job that looked like "the same step on lots of data".
In 2012, a neural network called AlexNet won the ImageNet image-recognition challenge by a wide margin. Its authors trained it on two NVIDIA GTX 580 GPUs with 3 GB of memory each, over five to six days. That result is widely seen as the moment deep learning took off, and GPUs came with it.
Why AI is "stadium work"
A neural network layer does one main thing: it multiplies a list of input numbers by a big grid of weights. That is called a matrix multiplication. And a matrix multiplication is just a huge number of small multiply-then-add steps, most of which do not depend on each other.
For example, one output number of a layer might be: 0.2×w1 + 0.7×w2 + 0.1×w3 + … for thousands of inputs. Every output number can be computed at the same time as every other one. Large language models are mostly stacks of these multiplications, repeated layer after layer.
In the stadium
Marking a million multiple-choice answers against an answer key. Every paper can be marked by a different student, at the same time.
In the silicon
Matrix multiplication: millions of independent multiply-adds. Exactly the work GPUs were built to spread across thousands of cores.
Inside the chip
Let's open up a real data-centre GPU: NVIDIA's H100 (the SXM5 version, launched in 2022 and widely used for AI). Click the parts.
1 square = 1 SM (132 in total)memory
The whole chip
The H100 SXM5 has 132 Streaming Multiprocessors (SMs). An SM is a self-contained block that runs groups of threads. Think of each SM as one section of the stadium, with its own supervisors, desks and whiteboard.
One Streaming Multiprocessor
Each H100 SM is split into four parts. Each part has its own warp scheduler, 32 FP32 cores for ordinary maths, one Tensor Core for matrix maths, and its own registers. All four share a fast on-chip memory.
L2 cache
A 50 MB cache shared by all 132 SMs. It keeps recently used data on the chip, so SMs do not always have to go out to the main memory.
HBM: the main memory
80 GB of HBM3 (High Bandwidth Memory), stacked right next to the GPU chip. It can deliver about 3.35 terabytes per second. This is where the model's weights live, and as you will see in Chapter 8, it is often the real speed limit.
In the stadium
The stadium is divided into 132 sections. Each section has four rows of students, a supervisor for each row, a few times-table machines and a shared whiteboard. The library across the road holds all the books.
In the silicon
132 SMs. Each has 4 warp schedulers, 128 FP32 cores, 4 Tensor Cores and shared memory. The L2 cache is shared by all SMs. HBM holds the model.
Warps: 32 threads in lockstep
A thread is one small stream of work, like "compute output number 4,217". A GPU program launches thousands or millions of threads. But an SM does not manage them one by one. It handles them in groups of 32, called a warp.
All 32 threads of a warp run the same instruction at the same time, each on its own data. NVIDIA calls this SIMT: single instruction, multiple threads. It is cheap: one instruction is fetched and decoded once, and 32 threads use it.
But there is a catch. What if threads in the same warp disagree at an "if"? Step through it:
A warp of 32 threads. Half will take the "if", half the "else". Press Step.
In the stadium
Each row of 32 students reads the same instruction from one board. If the board says "students with even numbers, double it; others, add one", the even half works while the odd half waits, then they swap.
In the silicon
A warp issues one instruction for 32 threads. Branches that split a warp are run one path after the other, with the inactive threads masked off.
Hiding the wait
Fetching data from main memory is slow compared with doing maths: hundreds of clock cycles. A CPU fights this with big caches and clever prediction, so it rarely has to wait.
A GPU uses a different trick. Each SM keeps many warps loaded at once, each with its own registers already in place. When one warp has to wait for memory, the scheduler simply switches to another warp that is ready, with no setup cost. With enough warps, someone is always doing maths. This is called latency hiding.
One warp: compute, then wait for memory
Four warps: while one waits, another computes
doing mathswaiting for memory (another warp can run)SM idle: nobody readyready, waiting for its turn
In the stadium
When one row sends a runner to the library, the supervisor doesn't wait. They turn to the next row and give them work. Each row's notes stay on their desks, so switching costs nothing.
In the silicon
Warps that stall on memory are set aside, and the warp scheduler issues instructions from ready warps. Because every warp's registers stay on the SM, switching is essentially free.
This is also why GPUs need lots of work to be fast. Give a GPU only a few threads and there is nobody to switch to: it waits, just like the lonely warp above.
Memory is often the real limit
A GPU has a ladder of memories. The closer to the cores, the faster and smaller:
| Memory | Where it is | Size on H100 | Stadium version |
|---|---|---|---|
| Registers | Inside each SM, private to each thread | 256 KB per SM | A student's scrap paper |
| Shared memory / L1 | Inside each SM; shared by the threads of one thread block | 256 KB per SM (combined) | The section's whiteboard |
| L2 cache | On the chip, shared by all SMs | 50 MB | The stadium's reading room |
| HBM3 | Stacked next to the chip | 80 GB, about 3.35 TB/s | The library across the road |
Here is the key idea. For every job, ask: how much maths do I do for each byte I read from memory? That ratio is called arithmetic intensity.
- If you do lots of maths per byte, the cores are the bottleneck. The job is math-bound.
- If you do little maths per byte, the cores finish quickly and then wait for data. The job is memory-bound, no matter how many cores you have.
The tipping point is the chip's peak maths speed divided by its memory speed. Drag the slider, or pick a preset:
This explains something from Part 1. When a chatbot writes an answer for one person, every new token needs the entire model read from HBM, but does only a little maths with each weight. So token generation is memory-bound: the speed of the library corridor, not the number of students, sets the pace. That is why serving systems like vLLM batch many users together: each weight read from memory is reused for many users at once.
In the stadium
If every student needs a new library book for each sum, it doesn't matter how many students you have: the corridor to the library is jammed. If each book is used for hundreds of sums, the students become the limit.
In the silicon
Low arithmetic intensity means memory-bound; high means math-bound. Batching, caching and smaller number formats all raise the useful work per byte moved.
Tensor Cores and smaller numbers
Ordinary GPU cores do one multiply-add for one thread per step. In 2017, NVIDIA's Volta generation (the V100) added a new kind of unit: the Tensor Core. A Tensor Core multiplies and adds a whole small block of numbers (a matrix tile) in one operation.
Pick a way to multiply the two tiles.
Smaller numbers, more speed
Numbers in a computer have a precision: how many bits are used to store each one. Classic scientific computing uses 64 or 32 bits. AI models turned out to work well with far fewer, and fewer bits mean less memory to read and more maths per second. Each GPU generation has added new, mostly smaller formats to its Tensor Cores:
First Tensor Cores, 16-bit (FP16) inputs
Adds 8-bit and 4-bit integers (INT8, INT4) for inference
Adds TF32 (speeds up 32-bit work) and BF16 (32-bit range in 16 bits)
Adds 8-bit floating point (FP8)
Adds 4-bit floating point (FP4)
Halve the bits and you halve the bytes read from memory for the same model, which matters a lot when you are memory-bound. The trade-off is accuracy, which is why choosing a format is a careful engineering decision. We will cover it properly in the quantization part of this series.
In the stadium
Each section gets a few times-table machines that fill in a whole small grid at once. And answers rounded to fewer decimal places are faster to write down and carry.
In the silicon
Tensor Cores do matrix multiply-accumulate on tiles, and support lower-precision formats (FP16, BF16, FP8, FP4) for more speed and less memory traffic.
When the CPU still wins, and how they work together
GPUs are not "better CPUs". They are a different tool. Here is the honest comparison:
| Question | CPU | GPU |
|---|---|---|
| Built to optimise | Latency: one task, fast | Throughput: many tasks per second |
| Cores | Few, powerful, independent | Thousands of simple units, grouped in SMs |
| Best at | Branchy logic, operating systems, databases, web servers | The same maths on lots of data: graphics, AI, simulations |
| Handles waiting by | Big caches, prediction, out-of-order execution | Switching between many warps |
| Weak at | Massive parallel arithmetic | Sequential steps, heavy branching, small jobs |
| Main memory | Large and flexible (often hundreds of GB or more) | Smaller but very fast (tens to hundreds of GB of HBM) |
| Memory speed (top chips, 2026) | AMD EPYC 9996 (announced 2026): up to about 1.6 TB/s per socket, with the fastest supported memory | H100: 3.35 TB/s · B200: up to 8 TB/s |
In practice they always work as a team. The CPU is the host: it runs the operating system and your program, loads data, and decides what to do. The GPU is the device: the CPU sends it big blocks of maths to do, and it sends results back. Data travels between them over a connection such as PCIe, and between GPUs over faster links such as NVIDIA's NVLink.
In the stadium
The professor plans the exam, decides what needs marking and checks the tricky cases. The stadium does the bulk marking.
In the silicon
The CPU (host) runs the program and schedules work; the GPU (device) runs the massively parallel parts. Moving data between them has a cost, so good programs keep data on the GPU as long as possible.
Try it yourself
If you have a computer with an NVIDIA GPU and its driver installed, or a free GPU notebook such as Google Colab, you can look at a real GPU in seconds.
nvidia-smi
nvidia-smi --query-gpu=name,memory.total,memory.used,utilization.gpu --format=csv
import torch print(torch.cuda.is_available()) print(torch.cuda.get_device_name(0))
Watch utilization.gpu while a model runs. If it is low, the GPU is often waiting: for data from the CPU, or for memory. That is the memory wall from Chapter 8, showing up on your own screen.
nvidia-smi is the first command every GPU engineer runs: what GPU is this, how much memory is used, and is it busy?Cheat sheet and quiz
Glossary
- CPU
- Central processing unit. Few powerful cores, built for latency: finishing one task fast.
- GPU
- Graphics processing unit. Thousands of simple arithmetic units, built for throughput.
- Latency
- How long one task takes from start to finish.
- Throughput
- How many tasks are finished per second.
- SM
- Streaming Multiprocessor: one of the identical blocks a GPU is built from. Runs many warps.
- Thread
- One small stream of work, like computing one output number.
- Warp
- A group of 32 threads that run the same instruction together (SIMT).
- Divergence
- When threads in a warp take different branches, so the paths run one after another.
- Latency hiding
- Keeping many warps ready, so the SM switches to another one while a warp waits for memory.
- HBM
- High Bandwidth Memory: the GPU's main memory, stacked beside the chip.
- Memory bandwidth
- How many bytes per second can move between memory and the chip.
- Arithmetic intensity
- Maths operations per byte read. Low means memory-bound, high means math-bound.
- Tensor Core
- A unit that multiplies and adds whole small matrix tiles in one operation.
- Precision
- How many bits store each number (FP32, FP16, BF16, FP8, FP4). Fewer bits: faster, less exact.
- Host and device
- The CPU (host) runs the program and sends bulk maths to the GPU (device).
- CUDA
- NVIDIA's platform for programming its GPUs. Its own article is coming next.
Quick quiz
1. Why is a CPU still the right chip for running a web server or database?
That work is full of different, branchy, sequential decisions that need fast answers. CPUs are built for latency on exactly that kind of work.
2. What is a warp, and why does an "if" inside it cost time?
A group of 32 threads running the same instruction. If they disagree at an "if", each path runs in turn while the other threads wait (divergence).
3. How does a GPU deal with slow memory, compared with a CPU?
A CPU avoids waiting with big caches and prediction. A GPU keeps many warps loaded and switches to a ready one whenever a warp waits (latency hiding).
4. Why is chatbot token generation usually memory-bound?
Each new token needs every weight read from memory, but only a little maths is done per weight. Batching many users reuses each weight and raises the maths per byte.
5. What does a Tensor Core do differently from an ordinary core?
It multiplies and adds a whole small matrix tile in one operation, usually in smaller number formats such as FP16, BF16 or FP8.
Next in this series
Sources
- NVIDIA, CUDA C++ Programming Guide (12.9 archive): "The Benefits of Using GPUs", SIMT architecture, hardware multithreading. Current guide: docs.nvidia.com/cuda/cuda-programming-guide.
- NVIDIA, GPU Performance Background User's Guide: SMs, arithmetic intensity, math-limited vs memory-limited.
- NVIDIA, Matrix Multiplication Background User's Guide.
- NVIDIA, H100 Tensor Core GPU Architecture whitepaper and NVIDIA Hopper Architecture In-Depth.
- NVIDIA, H100 product page and datasheet: memory, bandwidth, TFLOPS (sparsity figures halved for dense).
- NVIDIA, Hopper Tuning Guide: registers and shared memory per SM.
- NVIDIA, Programming Tensor Cores in CUDA 9 and Inside Volta.
- NVIDIA, Ampere Architecture In-Depth (TF32, BF16) and Introducing NVFP4 (Blackwell FP4).
- NVIDIA, Blackwell architecture and DGX B200 (up to 8 TB/s per GPU).
- NVIDIA, Fermi Compute Architecture whitepaper: G80 / GeForce 8800 and the introduction of CUDA in 2006.
- Krizhevsky, Sutskever, Hinton, ImageNet Classification with Deep Convolutional Neural Networks (AlexNet), NeurIPS 2012.
- Zhong et al., DistServe (2024): decode is limited by memory bandwidth; batching raises arithmetic intensity.
- AMD, EPYC 9996 product page and 6th Gen EPYC (Venice) announcement, 2026.
- NVIDIA, nvidia-smi documentation; PyTorch, torch.cuda.
Written for supraj.dev. Every number in this article comes from the sources above and was checked on 11 October 2026. Simplified drawings and toy numbers are labelled as such.