GPU and Accelerator Architecture
Map software work to accelerator hardware
Learn how GPUs schedule warps, supply execution pipelines, accelerate matrix operations, and move data through the memory hierarchy.
A graphics processing unit (GPU) is not simply a central processing unit (CPU) with more cores. The GPU allocates hardware resources for workloads that contain many similar, independent operations. A CPU invests heavily in reducing the completion time of a small number of instruction streams. A GPU instead keeps many groups of threads available and switches among them when an instruction must wait. Both processors execute instructions and access memory, but the processors tolerate delay in different ways.
The chapter develops the distinction from a concrete memory-load example. The later sections explain how CUDA threads become warps, how warps occupy streaming multiprocessors, how matrix engines accelerate structured operations, and how data moves through the memory hierarchy. The terms are specific enough for NVIDIA profiling tools, but the underlying model also applies to AMD compute units and other tensor accelerators.
The purpose of the chapter is prediction. By the end, you should be able to examine an operator and predict which hardware resources it needs, which conditions can prevent those resources from doing useful work, and which measurements would confirm the prediction. Later chapters will turn this architectural model into CUDA code and profiler analysis.
Prerequisites
- Chapter 1 sections on latency, throughput, and roofline models
- Chapter 3 diagram of a transformer forward pass
- Ability to identify an instruction, processor core, cache, and off-chip memory in a basic computer diagram
Learning objectives
- Predict when CPU latency mechanisms or GPU throughput mechanisms fit a workload
- Explain how CUDA threads become blocks and 32-lane warps on an NVIDIA GPU
- Trace matrix operands and outputs through execution pipelines and the GPU storage hierarchy
Study this chapter
- 4.1Latency processors and throughput processorsBegin lesson →
Given one memory-dependent workload, predict whether CPU latency reduction or GPU latency hiding is likely to matter and name the measurement that tests the prediction
- 4.2SMs, warps, and SIMTBegin lesson →
Map a CUDA grid to blocks, 32-thread warps, and streaming multiprocessors and explain the visible effect of branch divergence
- 4.3Tensor cores and matrix enginesBegin lesson →
Explain why instruction-tile shape, operand layout, input precision, accumulator precision, and surrounding data movement limit measured matrix-kernel throughput
- 4.4Accelerator memory hierarchyBegin lesson →
Assign one value to registers, block-shared memory, cache, or device memory from its owner, lifetime, reuse, and synchronization requirements
Extended exercises
Complete these projects after the lesson-level practice tasks. Each project combines several mechanisms from the chapter.
Map an operator
For one [2,048, 4,096] normalization or projection tensor, draw the logical threads, blocks, warps, execution pipeline, and each named storage transition.
Evidence: A labeled diagram plus three sentences that predict what Nsight Systems or Nsight Compute would display.
Architecture compare
Compare one NVIDIA GPU and one alternative accelerator using the same matrix shape, datatype, storage capacity, measured payload bandwidth, and programming interface.
Evidence: A source-linked table that distinguishes specified peak values from measured workload values.
Shape sensitivity
Benchmark one matrix multiplication across aligned, narrow, and ragged M, N, and K dimensions after warm-up.
Evidence: Raw timings, local tile counts, requested and transferred bytes where available, and an explanation of each curve change.
Sources and further reading
The lesson explanations synthesize primary papers and official references. Follow the originals for proofs, exact APIs, architecture details, and version-sensitive behavior.