r/ComputerEngineering • u/EngrToday Performance Architect • Oct 14 '19
[Hardware] Computer Architecture Highlights: Week 13
Hi all! I'm an architecture PhD student, and I wanted to start posting a brief summary of an influential research paper (either old or new) every week! Here's an early GPU architecture paper targeting warp divergence and SIMD efficiency!
Title: Dynamic Warp Formation and Scheduling for Efficient GPU Control Flow
Conference: MICRO 2007
Paper Link: Link
Background: GPUs follow the Single Instruction Multiple Thread (SIMT) execution model, where groups of threads (called warps by NVIDIA, or wavefronts by AMD) all execute the same (single) instruction together. However, each thread may not execute down the same control flow path. When this happens, only some of the threads in a warp/wavefront will be active, as diverging control flow paths are serialized (however, more modern architecture will execute them in parallel, but not concurrently). This leads to loss in Single Instruction Multiple Data (SIMD) efficiency, as not all lanes in a warp will actually being doing useful computation when divergence occurs. How do we keep the programmer flexibility of allowing threads to go down different control flow paths, but still maintain SIMD efficiency?
Solution: In many cases, more than one warp/wavefront will be diverged at the same time. Furthermore, GPU applications have relatively simple control flow (as compared with CPU applications), therefore multiple diverged warps/wavefronts often have threads going down the same control flow path. So why don't we dynamically reform warps, packing threads going down the same control flow paths together, avoiding the serialization from control flow divergence! However, naively mixing threads from one warp/wavefront together with another can lead to problems, such as bank conflicts. To fix this, the authors introduce a lane-aware dynamic warp formation scheme.
Major Impact: The late 2000s was a explosive time for GPU architecture research, as that was around the time general purpose compute on them was taking off. Papers like this, and many others at the time were part of a now large body of work that tried to tackle control flow divergence in GPUs. The authors provided a fairly detailed description of the performance implications of warp divergence with different architecture features, and provided a technique that improved performance in simulation by an average of 20%.
That's all for this week! Check out the paper linked above for more details on warp divergence, and how the authors attempted to solve this problem through some architecture and scheduling modifications. Have a nice start to the week on Monday!
--Nick
Last Week's: Link
My YouTube: Link
My GitHub: Link