What is GPU?
Short for graphics processing unit: a processor with many simple execution units that processes large amounts of data in parallel. Besides graphics, it is widely used for AI training and inference.
Field: CPUs and architecture
Read the beginner explainer: Why Are GPUs Used for AI? Matrix Math and Memory Explained
Japanese name: GPU
How a GPU is organized
A GPU contains many streaming multiprocessors (SMs), each a cluster of simple execution units with its own registers and on-chip shared memory. Rather than making one thread fast with large caches and elaborate branch prediction, as a CPU core does, a GPU keeps thousands of threads in flight and switches to another group whenever one is waiting for memory. This hides latency through sheer parallelism and maximizes throughput. Threads are scheduled in fixed-size groups that issue the same instruction together in lockstep, 32 threads called a warp on NVIDIA GPUs, a model called SIMT (single instruction, multiple threads).
SIMT vs. CPU SIMD
CPU SIMD instructions apply one operation to a vector register holding a fixed number of elements, and the programmer or compiler must code for that width. With SIMT the programmer writes ordinary code for a single thread, and the hardware groups threads into warps. Threads may take different branches, but the hardware then runs the paths one after another, wasting lanes. GPUs therefore excel when each element is processed independently with the same operation, and struggle with serial, data-dependent work such as walking a linked list.
Memory bandwidth is the bottleneck
Feeding thousands of execution units needs enormous bandwidth. Graphics boards use GDDR memory, with per-pin rates above 20 Gb/s in high-speed generations, placed around the GPU on short traces. AI accelerators instead place stacked HBM next to the GPU on a silicon interposer (2.5D packaging); each HBM package has 1,024 or 2,048 data lines, so several of them deliver several TB/s. Software must cooperate: when adjacent threads read adjacent addresses, accesses coalesce into a few wide transactions, which is why a structure of arrays usually beats an array of structures.
How GPU programs are written
In CUDA and similar frameworks, the CPU launches a kernel, a function that many GPU threads execute at once. One launch forms a grid of blocks, each block containing many threads that run on the same SM and can cooperate through shared memory. Each thread computes its own index to pick a data element, and the guard if (i < n) stops surplus threads in the last block from accessing memory beyond the array. Because blocks run independently, the same program scales across small and large GPUs.
Try it: questions about GPU
- ASiP (system in package)
- BCommodity DRAM
- CSoC (system on chip)
Show answer and explanation
Answer: C. SoC (system on chip)
An SoC integrates most of a system's functions on a single chip; smartphone processors are the classic example. Eliminating chip-to-chip wiring reduces part count and makes systems smaller, faster and lower-power. On the other hand, larger dies yield worse, and circuits requiring different processes are hard to combine. It is distinguished from an SiP, which houses multiple chips in one package. Commodity DRAM is a standalone memory product.
- ATo increase part count
- BTo connect the chips over short distances with an extremely large number of wires, achieving very high memory bandwidth
- CTo reduce memory capacity
Show answer and explanation
Answer: B. To connect the chips over short distances with an extremely large number of wires, achieving very high memory bandwidth
Each HBM stack has 1,024 data lines (2,048 in HBM4), and several stacks add up to thousands, more than an ordinary package substrate can route. Placing the GPU and HBM side by side on a silicon interposer with fine wiring connects them through many short wires only millimeters long, achieving memory bandwidth of several TB/s needed for AI computation. The purpose is neither to add parts nor to reduce capacity.
FAQ
What is the difference between a CPU and a GPU?
A CPU has a few complex cores optimized to finish individual tasks with low latency, while a GPU has many simple cores optimized for total throughput on highly parallel work. The GPU hides memory latency by switching among thousands of threads instead of relying on large caches.
Why are GPUs used for AI?
Neural-network training and inference consist mostly of large matrix multiplications that apply the same operations to huge arrays, which maps naturally onto thousands of parallel threads. High-bandwidth memory such as HBM keeps those units supplied with data.
What is warp divergence?
It happens when threads in the same warp take different branches; the hardware executes each path in turn while the other threads sit idle, reducing efficiency. Keeping branch conditions uniform within a warp avoids it.
Questions that mention GPU (54)
GPU appears in 56 practice questions across 9 topics, including GPU Programming, AI Hardware & Software Stack, Semiconductor industry and market.
- Which processing tends to run inefficiently on a GPU?
- In GPU programming such as CUDA, what is a "kernel"?
- How does the GPU SIMT (single instruction, multiple threads) model differ from CPU SIMD instructions?
- Which describes memory coalescing on a GPU?
- When processing particle data with positions x, y and z (each a 4-byte float) on a GPU, which layout is better for memory coalescing?
- When multiplying large matrices on a GPU, why are the matrices split into small tiles loaded into shared memory?
- Which describes occupancy on a GPU?
- What is the main way a GPU hides long memory latency (hundreds of cycles)?
- Building a histogram of pixel values on a GPU can be slow if every thread does atomicAdd directly on 256 bins in global memory. What is a good improvement?
- When summing many values on a GPU, why use a tree-shaped reduction (repeatedly adding neighbors to halve the count)?
- In a program using a discrete GPU, what is generally true about CPU-side and GPU-side memory?
- Sending data to a GPU for light work such as adding array elements once can be slower than computing on the CPU. What is the main reason?
- Why does pinning (page-locking) CPU memory before transferring it to the GPU speed up the transfer?
- When a GPU performs element-wise addition of two large arrays (c[i] = a[i] + b[i]), what mainly determines performance?
- In GPU mixed-precision computation, why are multiplications often done in a low precision such as FP16 while accumulation is done in FP32?
Books on CPUs and architecture Ad
As an Amazon Associate I earn from qualifying purchases.
Comparisons that include this term
- CPU vs GPU: Differences in Architecture and UseCPU vs GPU compared in a table: design goal, core count, execution model, caches, memory bandwidth, branching…
- CPU vs GPU vs NPU: Key Differences ExplainedCPU vs GPU vs NPU: design philosophy, compute units, control, memory, data types (INT8, FP16, etc.), performa…
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.
Back to the glossary