How can thousands of slow, simple cores outrun a few fast ones?
GPUs and Parallel Computing · about 16 minutes a level
A one-semester course on parallel computing with graphics processors: latency and throughput, Amdahl's and Gustafson's laws, GPU architecture, the kernel, thread, block and grid programming model (with NVIDIA's CUDA platform as the worked example, plus portable alternatives), memory coalescing, shared memory, synchronisation and atomics, the core parallel patterns, performance analysis with occupancy, the roofline model and profiling, GPUs for deep learning, multi-GPU systems, and the graphics pipeline and other accelerators in outline.
Go deeper, level by level
- Why parallel: latency, throughput and speedup: Latency, throughput and why GPUs exist, Amdahl's law and fixed-size speedup, Gustafson's law, scaling and efficiency
- Inside a GPU: architecture: Streaming multiprocessors and SIMT, Warps, scheduling and divergence, The GPU memory hierarchy
- The CUDA programming model: Kernels, threads, blocks and grids, Host, device and data movement, Portable GPU programming
- Memory access: coalescing and shared memory: Coalesced memory access, Shared memory as a scratchpad, Bank conflicts
- Synchronisation and atomics: Data races and barriers, Atomic operations, Warp-level primitives and memory ordering
- Parallel patterns: map, stencil, reduce and scan: Map and stencil, Parallel reduction, Prefix sum (scan)
- Parallel patterns: histogram, matrix multiply and sorting: Histograms and privatisation, Tiled matrix multiplication, Compaction, radix sort and sparse matrices
- Performance: occupancy, the roofline and profiling: Occupancy, The roofline model, Measuring and profiling
- GPUs for deep learning: Tensor cores and number formats, Mixed-precision training, Data, tensor and pipeline parallelism
- Multi-GPU systems, graphics and other accelerators: Multi-GPU systems and interconnects, The graphics pipeline, Other accelerators
Every lesson shows its sources and how sure we are, and is checked by Everwhy.