🤖 AI Summary
Data races in GPU programs pose a serious threat to the reliability of accelerated software. Existing dynamic approaches often miss real races, while static methods suffer from high false-positive rates. This work proposes a novel static analysis technique that integrates CPU host code with GPU kernel code, systematically leveraging the semantic information embedded in kernel launch parameters from the host side. By performing cross-CPU-GPU cooperative analysis and precise parameter range inference, the method accurately identifies genuine data races. It achieves full coverage with zero false positives and zero false negatives—eliminating the missed detections inherent in dynamic tools like iGUARD and outperforming static analyzers such as GPUVerify and FaialAA. The approach sets a new state of the art in both accuracy and completeness for GPU race detection.
📝 Abstract
Data races in GPU programs pose a threat to the reliability of GPU-accelerated software stacks. Prior works proposed various dynamic (runtime) and static (compile-time) techniques to detect races in GPU programs. However, dynamic techniques often miss critical races, as they require the races to manifest during testing. While static ones can catch such races, they often generate numerous false alarms by conservatively assuming values of variables/parameters that cannot ever occur during any execution of the program.
We make a key observation that the host (CPU) code that launches GPU kernels contains crucial semantic information about the values that the GPU kernel's parameters can take during execution. Harnessing this hitherto overlooked information helps accurately detect data races in GPU kernel code. We create HGRD, a new state-of-the-art static analysis technique that performs a holistic analysis of both CPU and GPU code to accurately detect a broad set of true races while minimizing false alarms. While SOTA dynamic techniques, such as iGUARD, miss many true races, HGRD misses none. On the other hand, static techniques such as GPUVerify and FaialAA raise tens of false alarms, where HGRD raises none.