A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

GPU Architecture and SIMT Execution

College Depth 113 in the knowledge graph ☐ I know this ☆ Set as goal
598prerequisites beneath it
See this on the map →
Memory HierarchyMulticore Processors and Hardware Multithreading+1 more→
GPU SIMT data-level-parallelism warps CUDA throughput parallelism

Core Idea

A graphics processing unit (GPU) is a processor built for throughput: it runs thousands of lightweight threads at once on many simple cores, rather than running a few threads as fast as possible as a CPU does. GPUs group threads that execute the same instruction together, a model NVIDIA calls SIMT (single instruction, multiple threads), with groups of 32 threads called warps. They hide slow memory accesses by switching to other ready groups of threads instead of relying mainly on large caches. This design suits data-parallel work such as graphics, matrix arithmetic and neural-network training.

How It's Best Learned

Compare a CPU and a GPU die diagram: the CPU spends area on large caches and control logic for a few fast cores, the GPU on many arithmetic units. Write the same vector addition as a CPU loop and as a GPU kernel where each thread handles one element. Then show branch divergence with an if-else inside a kernel, and time a tiny problem to see that copying data to the GPU can cost more than the computation.

Common Misconceptions

Explainer

A CPU core is designed to run one thread as fast as possible. It spends much of its chip area on large caches, branch predictors and out-of-order logic that shave latency off each instruction. A GPU makes the opposite trade. It spends its area on arithmetic units and on keeping thousands of threads ready, accepting that each individual thread is slow. The goal is throughput: the most total work per second.

Picture adding two arrays of a million numbers. On a CPU you write a loop. On a GPU you write a kernel, a function that adds one pair of elements, and launch it with a million threads, each using its own index. Programming systems such as NVIDIA's CUDA and the open standard OpenCL let you write kernels like this in a C-like language.

The hardware groups threads to save control logic. An NVIDIA GPU contains many streaming multiprocessors, and each multiprocessor runs threads in warps of 32. All threads in a warp execute the same instruction at the same time on different data. NVIDIA calls this SIMT, single instruction, multiple threads. It resembles SIMD vector instructions, but each thread has its own registers and its own program counter in the programming model. The cost of that flexibility is divergence. If threads in one warp take different sides of an if-statement, the warp runs each side in turn with the other threads switched off.

Memory is the other key to GPU design. A GPU's memory has very high bandwidth, but each access still takes hundreds of cycles. Rather than relying mainly on big caches, a multiprocessor keeps many warps resident and switches to a ready warp whenever the current one stalls. This is hardware multithreading on a large scale. Programmers help by launching many more threads than there are cores. They also arrange for neighboring threads to access neighboring addresses, which lets the hardware coalesce them into a few wide memory transactions.

These choices make GPUs very fast at regular, data-parallel work: rendering, image processing, scientific simulation and the matrix multiplications at the heart of deep learning. They also explain the limits. Serial code uses a tiny fraction of the chip. Heavy branching causes divergence. And for small jobs on a separate graphics card, the time to copy data across the bus can outweigh the computation itself.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Number Bonds Within 5 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Regular Language Recognition Algorithms → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Context-Free Grammar Properties and Ambiguity → Parse Trees, Derivations, and Ambiguity in CFGs → Context-Free Grammars in Compiler Design → Abstract Syntax Trees (ASTs) → Symbol Tables and Scope Resolution → Semantic Analysis Phase → Scope and Binding Resolution → Scope, Shadowing, and Variable Lifetime → Parameter Passing: Value vs. Reference → Two-Dimensional Arrays → Graph Representations: Adjacency List vs. Adjacency Matrix → Control Flow Graphs → Fixpoint Computation and Iteration → Dataflow Analysis → Reaching Definitions Analysis → Common Subexpression Elimination (CSE) → Dead Code Elimination → Code Optimization Fundamentals → Vectorization and SIMD Code Generation → GPU Architecture and SIMT Execution

Longest path: 114 steps · 598 total prerequisite topics

Prerequisites (3)

Leads To (0)

No topics depend on this one yet.