arXiv:2610.07541cs.PLOct 2026

Manuscript Offprint

arXiv:2610.07541

WarpDRF: Data-Race Freedom for Warp-Level Programming

Zheyuan Chen, Simon Kagle, Tiago Cogumbreiro, Tyler Sorensen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

WarpDRF: The Unwritten Contract of GPU Warp Programming

Zheyuan Chen

University of California at Santa Cruz

zchen406@ucsc.edu

Tiago Cogumbreiro

University of Massachusetts Boston

Tiago.Cogumbreiro@umb.edu

Simon Kagle

University of California at Santa Cruz

skagle@ucsc.edu

Tyler Sorensen

University of California at Santa Cruz

Microsoft Research

tsorensen@microsoft.com

Abstract

Warp primitives such as tensor core operations, shuffles, reductions, and barriers are critical to high-performance GPU kernels, and every major GPU language supports some set of them. The threads that participate in a primitive, and therefore synchronize, are determined dynamically by how threads diverge and reconverge, and by intra-warp scheduling such as independent thread scheduling. In practice, many high-performance kernels use these primitives and behave as expected, following an intuitive but unwritten data-race-freedom contract that has never been stated precisely or empirically tested.

We present WarpDRF, the first abstract warp programming model to make this contract precise, with participation rules parameterized by reconvergence guarantees and per-primitive requirements so that instantiations match different GPU languages. We prove (formalized in Rocq) that a kernel satisfying WarpDRF executes every warp primitive with the participants the reference semantics assigns and produces the same results, so a programmer can reason in the reference semantics alone. We implement the model in MLIR with a reference interpreter and fuzz 10K conformance tests for each of three configurations across CUDA, HIP, HLSL, Metal, and SPIR-V on 16 device and backend pairs; at least one WarpDRF configuration describes each, with CUDA honoring the strictly weakest configuration. Finally, we extend Faial, a static data-race analyzer for CUDA, into the first DRF checker for an empirically validated warp model, and apply it to llama.cpp, where most kernels that use warp primitives already satisfy the contract, but three contain previously unknown data races, showing the need for tools that check it.

References (24)