CPU and GPU Memory in AI Accelerators
An AI accelerator uses three memory tiers: on-chip SRAM caches, GPU high-bandwidth memory, and CPU system memory, each with a different balance of speed and size.
A Fast Cook and a Distant Pantry
Picture a kitchen where a cook can chop vegetables at great speed, but every ingredient has to be fetched from a storage room across the building. The cook spends most of the shift walking, not chopping. An AI accelerator faces a similar problem. Its arithmetic units can process numbers extremely quickly, yet they can only do useful work when the numbers they need are already within reach.
This article answers a practical question: when a model runs, where do its numbers live, and how long does it take to get them to the place where they are used? The short answer is that an accelerator does not have one memory. It has a layered arrangement in which each layer trades capacity for speed. Learning to read that arrangement is the first step toward understanding why some workloads run quickly and others stall.
The Three Memory Tiers
An AI accelerator can draw on three memory tiers: CPU system memory, the GPU's own high-bandwidth memory, and on-chip memory built into the silicon. Each tier offers a different balance of speed and size. The three are described one at a time below, and then compared side by side.
Where Each Tier Sits Relative to the Compute
Position matters as much as speed. The on-chip tier is inside the same silicon as the compute units, so it is the closest. GPU HBM is a separate pool dedicated to the GPU and placed near it, so it sits one step farther out. CPU system memory is the most distant: the accelerator reaches it through the connection to the host CPU. Read the diagram below from the compute outward. Each step adds capacity and adds distance.
Bandwidth Versus Capacity
Two properties describe each tier, and they are separate. Bandwidth is how fast data can be read or moved. Capacity is how much data the tier can hold. A chip can be strong on one and weak on the other, and both matter when judging whether a chip suits a memory-heavy workload. The table below collects the source's typical figures so the three tiers can be compared directly.
| Tier | Location relative to compute | Typical bandwidth | Typical capacity |
|---|---|---|---|
| On-chip SRAM | Inside the chip, closest | Often exceeding 10 TB/s | Typically 40 MB or less |
| GPU HBM | Dedicated to the GPU, placed nearby | 256 GB/s to more than 1.5 TB/s | Around 24 to 80 GB on a consumer GPU |
| CPU system memory | Reached through the CPU connection, farthest | 25 GB/s to 50 GB/s | Roughly 16 to 64 GB on a laptop, 1 TB or more on a high-end workstation |
Typical figures for the three memory tiers, as given in the source
Why the Fastest Tier Is the Smallest
Read across the table and a pattern appears: every step toward the compute increases speed and reduces room. The on-chip tier can be read at the highest rate but is measured in tens of megabytes, while CPU memory can hold tens or hundreds of gigabytes at a fraction of that rate. Designers cannot simply make the fastest memory bigger without changing the chip. That constraint is why the hierarchy exists at all.
Following One Chunk of Data
Speed numbers become meaningful when you watch a specific piece of data move. The scenario below is an invented illustration, not a measured benchmark. It uses the tier characteristics from the earlier sections to show how the same chunk of data can be far from the compute at one moment and close to it the next.
One Chunk of Data Moving Toward the Compute Units
A chunk of model data begins in CPU system memory and must be used by the compute units. Trace where it sits at each stage and identify which step is the slowest.
- 1Start in CPU system memory
The chunk sits in the largest pool, reached through the CPU connection. This is the farthest tier and the slowest, with transfer speeds of roughly 25 to 50 GB/s.
- 2Move into GPU HBM
The chunk is staged into the GPU's dedicated high-bandwidth memory, which is placed close to the GPU and can be read much faster, from 256 GB/s to more than 1.5 TB/s.
- 3Move into on-chip SRAM
A working portion of the chunk is staged into on-chip SRAM, the closest tier. It can be read at often more than 10 TB/s, but only about 40 MB or less fits.
- 4Feed the compute units
The arithmetic units now use the staged numbers. Work proceeds quickly as long as the next needed values are already staged in the fast tiers.
The chunk is far from compute at the start and close at the end. The step that takes longest is the first transfer out of CPU system memory, because that tier is the slowest.
What do you think happens?
Before the chunk reaches the compute units, which tier must it pass through first if it starts in CPU system memory, and which tier is the closest to the compute?
Reveal answer
GPU HBM first, on-chip SRAM is the closest
The chunk moves outward-in from CPU system memory to GPU HBM, then to on-chip SRAM, which sits inside the chip next to the compute units. On-chip SRAM is the closest tier and the fastest.
The slowdown is most likely to come from the outer edge of the path. The first transfer out of CPU system memory is the slowest link, and any data the compute units need that has not yet been staged into the fast tiers forces a wait. A workload that fits comfortably in the fast tiers behaves very differently from one that spills into the slow ones.
Why Memory Shapes Optimization and Accelerator Choice
Because the hierarchy determines speed, a large share of GPU optimization is about keeping useful data in the fast tiers for as long as possible. The source notes that, at the time it was written, mainstream frameworks such as PyTorch and TensorFlow did not yet offer fine-grained control over memory access. That gap pushed many engineers toward lower-level GPU programming languages, including CUDA, OpenAI's Triton, and ROCm. CUDA was originally called Compute Unified Device Architecture. ROCm is AMD's open source alternative to NVIDIA's proprietary CUDA.
The same reasoning applies when choosing an accelerator. Raw compute tells you how fast the arithmetic can run, but it does not tell you whether the numbers will be in reach. Bandwidth and capacity are separate properties of memory, and both matter when judging whether a chip suits a memory-heavy workload. A chip with strong compute but small or slow memory can stall on the same chunks of data that a better-balanced chip handles smoothly.
Mistakes Learners Make About Accelerator Memory
Common mistake Assuming the accelerator has one memory
Why it failsAn accelerator uses three tiers, each with a different balance of speed and size, not a single pool.
Do this insteadName the three tiers: on-chip SRAM, GPU HBM, and CPU system memory, and place each relative to the compute.
Common mistake Treating bandwidth and capacity as the same property
Why it failsBandwidth is how fast data moves, and capacity is how much fits. They are separate, and a chip can be strong on one and weak on the other.
Do this insteadJudge a chip on both properties when it will run a memory-heavy workload.
Common mistake Assuming the biggest memory is the best place for active data
Why it failsCPU system memory is the largest but the slowest. Data kept only there forces the compute units to wait.
Do this insteadStage the next needed values into the fast tiers rather than leaving them in the largest pool.
Common mistake Believing raw compute alone decides which accelerator suits a workload
Practice: Reading a Memory Layout
A workload repeatedly needs the same small set of values, about 20 MB in total, while the rest of the model sits in CPU system memory. Which tier should hold the repeatedly used values to keep the compute units fed, and why would keeping them only in CPU system memory slow the run? Explain your answer using the bandwidth and capacity figures for each tier.
Hints
- Compare the capacity of on-chip SRAM with the 20 MB working set.
- Think about which tier can be read at the highest rate and how far each tier is from the compute.
Summary
- 1An AI accelerator uses three memory tiers: on-chip SRAM inside the chip, GPU HBM dedicated to the GPU, and CPU system memory reached through the CPU connection.
- 2The tiers trade speed for size. On-chip SRAM is the fastest, often exceeding 10 TB/s, but typically holds 40 MB or less. CPU system memory is the slowest, at roughly 25 to 50 GB/s, but the largest.
- 3Bandwidth and capacity are separate properties, and both matter when judging whether a chip suits a memory-heavy workload.
- 4Data moves outward from CPU memory to GPU HBM to on-chip SRAM, and the first transfer out of CPU memory is often the slowest link. Performance depends on keeping the next needed values staged in the fast tiers.
- 5Memory access is a central target of GPU optimization, which is why the choice of accelerator depends on memory as well as raw compute.
At a glance
- An AI accelerator uses three memory tiers: on-chip SRAM, GPU high-bandwidth memory, and CPU system memory, each trading speed against size.
- The fastest tier, on-chip SRAM, is also the smallest, because fast memory cannot simply be made larger without changing the chip.
- Data moves outward from CPU memory through GPU HBM to on-chip SRAM, and slowdowns often come from data that has not yet been staged into the fast tiers.
- Memory access is central to GPU optimization, so accelerator choice depends on memory bandwidth and capacity as well as raw compute.