Part IA Michaelmas Term
GPU Architecture
What is a GPU?
A Graphics Processing Unit (GPU) is specialised hardware for graphics rendering:
- Optimised for floating-point operations on large arrays (vertices, pixels)
- Massively parallel: hundreds to thousands of SIMD processors
- High memory bandwidth (>1000 GB/s)
- Efficiently handles millions of triangles and pixels simultaneously
What Does a GPU Do?
- Low-level tasks: Clipping, rasterisation, hidden surface removal
- High-level tasks: Procedural shading, texturing, animation, simulation
- Modern GPUs: Ray tracing acceleration, physics, machine learning
GPU APIs
An Application Programming Interface (API) provides access to GPU functionality:
| API | Platform | Notes |
|---|---|---|
| OpenGL | Cross-platform | Open standard, general 3D applications |
| DirectX | Windows/Xbox | Proprietary, game-focused |
| Vulkan | Cross-platform | Low-overhead, high performance |
| Metal | Apple devices | Low-level, Swift/Objective-C |
| OpenGL ES | Mobile | Stripped-down OpenGL for embedded systems |
| WebGL | Browser | JavaScript, based on OpenGL ES |
| WebGPU | Browser | Access to Vulkan/Metal/DirectX 12 |
GPGPU: General Purpose Computing
- CUDA: Nvidia’s parallel computing architecture (C-like)
- OpenCL: Open standard for parallel computing (AMD, Intel, Nvidia)
Used for physics simulation, machine learning, scientific computing.
GPU vs CPU Architecture
CPU Design
- Few powerful cores (4-64 typical)
- Optimised for sequential code and complex logic
- Large caches per core
- Branch prediction, out-of-order execution
GPU Design
- Many simpler cores (thousands)
- Optimised for parallel throughput
- Small caches shared across many threads
- SIMT (Single Instruction, Multiple Threads) execution
Memory Hierarchy
GPU Memory Types
- Global memory: Large, high-latency, accessible by all threads
- Shared memory: Fast, user-managed cache within a block
- Registers: Fastest, private to each thread
- Texture memory: Cached, optimised for 2D spatial locality
- Constant memory: Read-only, cached, broadcast to threads
Bandwidth Considerations
Modern GPUs achieve memory bandwidths exceeding 1000 GB/s through:
- Wide memory buses (256-384 bit)
- High clock speeds (GDDR6X, HBM2)
- Multiple memory controllers operating in parallel
Summary
- GPUs are massively parallel processors optimised for graphics workloads
- Multiple APIs exist for GPU access (OpenGL, Vulkan, DirectX, Metal)
- GPGPU enables general-purpose computation on graphics hardware
- GPU architecture prioritises throughput over single-thread performance
Past Paper Questions
2024 Paper 3 Question 4: What are the key differences between a GPU and a CPU architecture?
2023 Paper 3 Question 4: Explain what GPGPU means and give two applications.
2022 Paper 3 Question 4: Why are GPUs more suitable than CPUs for graphics rendering?