undo
Go Beyond the Code
arrow_forward_ios

Why AI Runs on GPUs: The Architecture Explained

Luis Angel Moroco Ramos
Software Engineer & Solver
November 25, 2026
To learn more about this topic, click here.

Graphic Processing Unit (GPU) represents a mature realization of the many-core paradigm, combining thousands of concurrent execution lanes with a memory hierarchy engineered for parallel data movement. This article surveys the architectural mechanisms that make GPUs uniquely suited for Deep Learning (DL), including [Single Instruction, Multiple Threads] (SIMT) execution, thread block scheduling, occupancy-driven performance, and the reliance on high-throughput matrix operations. By contrasting these characteristics with conventional Central Processing Unit (CPU) pipelines and domain-specific accelerators, the post explains why many-core architectures scale efficiently with model size and why they continue to underpin state-of-the-art AI systems.


1. Introduction 

The success of DL over the past decade is inseparable from a parallel hardware shift: the massive adoption of GPUs as the principal computing resource for training and inference. Before the shift, Neural Networks (NN) were computationally impractical at scale. The creation of GPU-accelerated frameworks—initially manual Compute Unified Device Architecture (CUDA) [4] kernels and later through libraries such as cuBLAS [2] and cuDNN [3]—turned what were theoretical models into practical systems capable of processing industrial-scale parameters in reasonable time.

Understanding why GPUs are so effective for DL requires a bottom-up look at how they differ from CPUs. The answer is not merely that GPUs are faster; it is that their internal architecture was designed around  fundamentally different assumptions about workloads which map perfectly with the numerical structure of modern NN.

This article traces that alignment from first principles: from the diverging design philosophies of CPUs and GPUs, through the CUDA execution model that exposes those differences to programmers, to the memory hierarchy that governs actual throughput. The content draws primarily from Kirk and Hwu's authoritative text on GPU programming [1], supplemented by architectural figures that make the abstractions more understandable.


2.  Flynn's Taxonomy

Flynn [6][7] proposed a classification scheme that remains the standard reference for categorising how a processing system handles instruction and data streams. The taxonomy defines four classes based on two binary axes: whether the system executes a single instruction or multiple independent instructions at once, and whether it operates on a single data element or multiple data elements simultaneously. 1) Single Instruction, Single Data (SISD) represents the traditional sequential paradigm, where a single instruction operates on one data element at the time. 2) Multiple Instructions, Single Data (MISD) applies different operations to the same data stream, mainly appearing in specialized fault-tolerant systems. 3) Multiple Instructions, Multiple Data (MIMD) enables multiple processors to execute independent instruction streams on different data, though at the cost of higher hardware and control complexity. 4) Single Instruction, Multiple Data (SIMD) where a single instruction is issued once and executed simultaneously across many data elements, each residing in a different register lane [7].
‍
‍

SIMD vs. data parallelism diagram showing parallel bubble sort on GPU cores.
Figure 1. Parallel Bubble Sort: A single control unit broadcasts the same instruction to multiple processing elements (ALUs),
each operating simultaneously on different data elements. All units follow the same instruction stream; divergence is handled through
predicated execution, where each ALU conditionally applies the operation based on its local data. Source: [7].

‍

‍
NVIDIA's term for this variant is SIMT, which extends SIMD by giving each thread its own program counter and call stack within the warp while preserving the shared-instruction efficiency of classic SIMD [1]. A dominant operation in NN training is matrix multiplication [2], inherently SIMD, since each output element is computed as the inner product between the same weight row and different input vectors running independently of each other. This structural alignment, rather than any isolated numerical advantage, is what led GPUs to become the default hardware for DL.


3. SIMT‍

It is the core of every NVIDIA GPU [12]. It is the mechanism through which a single compiled instruction can drive thousands of concurrent execution lanes, and it is the reason why the GPU's arithmetic throughput scales so naturally with the parallelism inherent in DL workloads [8].  We ought to understand how threads are grouped into warps and mapped onto hardware, how the model enables zero-overhead latency hiding, how it behaves under different computational patterns, and where it breaks down.

GPU thread block mapped into a warp using linear thread ordering.
Figure 2. For a 4×4 block. Panel (A) shows the programmer's 2D view; panels (B–C) show the hardware's linear projection and the resulting warp.
The key implication is that threads with consecutive threadIdx.x values always end up in the same warp. Source: Adapted from [1].

‍

GPU SM execution timeline showing zero-overhead warp switching to hide memory stalls across three concurrent warps
Figure 3. The interleaving pattern. Warp 0 executes for two cycles, then stalls on a memory request. The SM immediately schedules Warp 1,
then Warp 2. By the time Warp 0's data arrives, both other warps have made progress. The SM execution pipeline is kept continuously
occupied—not through speculation or caching, but through massive thread-level parallelism. Source: Adapted from [1].

‍


A sufficient number of warps must be active at any given time—a property known as occupancy. Achieving high occupancy requires minimizing per-thread register usage and per-block shared memory consumption, so that more warps and blocks can reside concurrently on the SM [1]. As a result, occupancy-aware design is a key consideration in high-performance CUDA kernels.

‍

4. Latency vs Throughput

CPU and GPU stick to different engineering priorities [1]. Firstly, we must understand them.

  1. The Multi-Core CPU: Optimising for Latency. A modern CPU is designed to minimise the time it takes to complete a single, arbitrary instruction stream. To that end, its silicon area budget is dominated by structures that accelerate sequential execution: large multi-level caches (L1/L2/L3) that keep frequently used data close to the execution units, and sophisticated control logic that speculatively executes future instructions before the program explicitly requests them (out-of-order execution, branch prediction) [5]. The number of actual Arithmetic Logic Units (ALUs) is small—typically 4 to 32—because the bottleneck for most general-purpose workloads is not raw arithmetic capacity but memory latency and branch mis-prediction [1].

This design philosophy is appropriate to operating systems, databases, and web servers—workloads characterised by complex control flow, irregular memory access patterns, and tasks that are largely serial by nature [1]. 

  1. The Many-Core GPU: Optimising for Throughput. A GPU, by contrast, was originally engineered for rendering: every pixel on a screen must be shaded independently and simultaneously [1]. The insight that drove GPU architecture was that, if the workload is sufficiently parallel, the right response to memory latency is not to avoid it through caching and speculation but to tolerate it by switching to another thread. So, instead of dedicating chip space to cache and complex control mechanisms, GPUs use it to fit hundreds or thousands of simple computing units, allowing them to process many tasks at the same time [4].

The GPU's design philosophy is to maximise the chip area and power budget devoted to floating-point calculation [1]. The result is a raw floating-point throughput gap of roughly 10× over a CPU of the same generation, coupled with a memory bandwidth advantage of a similar magnitude—around 150 GB/s in a typical GPU compared to about 50 GB/s in a high-end CPU [1].
‍
‍

Multicore CPU vs many-core GPU architecture comparison showing ALU count and cache trade-offs
Figure 4. In (A), the CPU allocates most of its area to cache and control logic, with only a few compute units that are highly complex and powerful.
In (B), the GPU takes the opposite approach: it reduces cache and control to make room for hundreds of simpler processors. Source: Adapted from [1].

‍


5. Memory Architecture for High-Bandwidth Computing‍

High arithmetic throughput is exclusively achievable if data can be delivered to the execution units fast enough [1]. The GPU's memory system is explicitly designed around this constraint as explained below.

To overcome this, optimized kernels increase data reuse by loading data once into on-chip memory and reusing it multiple times. In tiled matrix multiplication, portions of the input matrices are first loaded into shared memory, and all required computations are performed before fetching new data [11]. This significantly increases the CGMA, allowing the kernel to better utilize the GPU’s computational throughput.

At the other end of the hierarchy lies global memory, which corresponds to the GPU’s main DRAM—GDDR or HBM. This is the largest but also the highest-latency memory space, used to store inputs, model parameters, and intermediate activations across kernel executions. Achieving high performance when accessing global memory depends on memory coalescing: when threads within a warp access contiguous memory locations, the hardware can combine these requests into a single wide transaction; otherwise, irregular access patterns result in multiple transactions, often one per thread, significantly reducing efficiency [1].
‍
‍

GPU memory hierarchy pyramid: registers, shared memory, L1 cache, and global GDDR DRAM by speed and proximity to ALUs
Figure 5. Memory hierarchy of a modern GPU. Registers and shared memory are on-chip and orders of magnitude faster than global (GDDR) memory. The CGMA ratio is the key metric: kernels that maximise reuse of on-chip data achieve near peak arithmetic throughput. Source: Adapted from [1].


6. Conclusions

The GPU's dominance in DL is not accidental. It is the product of a precise alignment between a hardware architecture optimised for regular, arithmetic-intensive, data-parallel workloads and a class of algorithms—neural networks—whose dominant operations, matrix multiplication, fit perfectly.

Three architectural mechanisms account for most of the advantage: (1) SIMT execution, which allows a single instruction to be applied to thousands of data elements simultaneously; (2) zero-overhead warp switching, which absorbs memory latency through massive thread-level parallelism rather than through speculative execution; and (3) a memory hierarchy that, when accessed correctly through high CGMA kernels, delivers data near the arithmetic peak of the device.

CPUs are not slow; they are optimised for a different problem. The branch prediction and out-of-order execution logic that give a CPU its single-thread performance advantage are precisely the structures that consume the die area which a GPU reallocates to arithmetic. Neither architecture is universally superior—but for the specific structure of deep learning computation, the GPU's design choices are nearly ideal.

‍

References

1. D. B. Kirk and W. W. Hwu, Programming Massively Parallel Processors:
A Hands-on Approach, 4th ed. Morgan Kaufmann, 2022.

2. L. A. Torres, C. J. Barrios H, and Y. Denneulin, “Evaluation of computational and energy performance in matrix multiplication algorithms on CPU and GPU using MKL, cuBLAS and SYCL,” arXiv preprint arXiv:
2405.17322, 2024.

3. S. Chetlur, C. Woolley, P. Vandermersch, J. Cohen, J. Tran, B. Catanzaro, and E. Shelhamer, “cuDNN: Efficient Primitives for Deep Learning,” arXiv preprint arXiv:
1410.0759, 2014.

4. R. S. Dehal, C. Munjal, A. A. Ansari and A. S. Kushwaha, "GPU Computing Revolution: CUDA," 2018 International Conference on Advances in Computing, Communication Control and Networking (ICACCCN), Greater Noida, India, 2018, pp. 197-201, doi:
10.1109/ICACCCN.2018.8748495.

5. Hennessy, John L., and David A. Patterson. Computer architecture:
a quantitative approach. Elsevier, 2011.

6. M. J. Flynn, “Flynn's Taxonomy,” 2011.

7. Carnegie Mellon University, “Big Picture First: Flynn's Taxonomy,” Apr. 14, 2010. [Online]. Available:
Link: http://users.ece.cmu.edu/~jhoe/course/ece447

8. Y. Wang, “SIMT in GPU: I used to have an incorrect understanding…,” LinkedIn. Available:
Link: https://www.linkedin.com/posts/yidewang_simt-in-gpu-i-used-to-have-an-incorrect-activity-7308667397794664448-cfEB/ (accessed: Mar. 20, 2026).

9. A. Osterhout and G. Gopalakrishnan, “SIMT/GPU Data Race Verification using ISCC and Intermediary Code Representations: A Case Study,” arXiv preprint arXiv: 2503.08946, 2025. [Online].
Available: https://arxiv.org/abs/2503.08946

10. Zhao, “From KV Cache to Zero Overhead Scheduling: Understanding SGLang’s Scheduler,” LinkedIn, 2026. [Online]. Available:
From KV Cache to Zero Overhead Scheduling.

11. E. Davis, “High Performance Matrix Multiplication,” arXiv preprint arXiv:2509.04594, 2025. [Online].
Available: https://arxiv.org/abs/2509.04594.

12. NVIDIA Corporation, CUDA C++ Programming Guide, v12.x, 2024. [Online].
Available: https://arxiv.org/abs/2509.04594

Luis Angel Moroco Ramos
Software Engineer & Solver
Arrow icon go to top

Start Your Digital Journey Now!

Which capabilities are you interested in?
You may select more than one.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.