Finding Performance Regressions in GPU Compilers
Abstract
Graphics Processing Units (GPUs) accelerate many modern computationally intensive workloads, and achieving high performance on them depends heavily on sophisticated GPU compiler optimizations. However, even small changes in GPU compiler optimization heuristics or code-generation decisions can silently introduce severe performance regressions without causing crashes or wrong outputs. These regressions are notoriously difficult to detect with existing approaches. Functional test suites and existing GPU compiler fuzzers primarily target correctness bugs, while benchmark suites lack the scale and diversity needed to systematically expose optimization failures. To address this, we present GPUDiff, an automated testing framework for finding performance bugs in GPU compilers. GPUDiff is grounded in the observation that GPU compiler optimizations are fundamentally shaped by the underlying GPU architecture. Guided by this principle, GPUDiff generates performance-centric program variants using architecture-informed mutations that stress three key dimensions of GPU execution: computation, memory hierarchy, and thread divergence. To address the testing oracle problem, GPUDiff uses differential testing, comparing each mutated program's performance across different compiler versions. Over three months, GPUDiff uncovered 20 issues in NVIDIA and AMD compilers. The median regression increases kernel execution time by 37%.