Stateful Testing for Deep Learning Compilers
Jiatao Ge, Ruixiang Qian, Yibo Hu, Yanzhou Mu, Yinglong Zou, Jiawei Liu, Zhenyu Chen, Chunrong Fang
Key points
From the paper's conclusion- We evaluate Rondo on four deep learning frameworks using 24 common model architectures.
Abstract
Modern deep learning compilers compile models lazily and cache artifacts across invocations. Retained compiler state can make a later invocation incorrect even when it is correct in isolation. An analysis of 26 publicly reported issues in PyTorch, JAX, and TensorFlow shows that detecting such bugs requires sequences that first establish compiler state and then expose a failure. We present Rondo, a stateful testing method that represents each test case as a model paired with an invocation sequence. Rondo mutates invocation sequences and uses a Markov chain Monte Carlo sampler guided by compilation behavior to favor rarely observed behaviors. Its three-way differential oracle compares execution without compilation, compiled execution with compiler state reset, and compiled execution with state retained. It confirms stateful bugs by replaying the same invocation with state retained and reset while preserving inputs and program state, then shortens sequences while preserving the original bug. We evaluate Rondo on four deep learning frameworks using 24 common model architectures. Rondo detects 117 bugs, including 35 stateful bugs. We submit 39 bug reports, including 18 for stateful bugs; developers confirm 35 reports, including 16 for stateful bugs, and fix 18 bugs, including 11 stateful bugs. Rondo achieves the highest behavior coverage and compiler Python source-line coverage among the compared methods, with 99.26% alarm precision. It shortens 44 of 117 invocation sequences, reducing the lengths of these 44 sequences by 83.34% on average.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- XLA from the Trenches: Correctness on TPU Workloads at ScalearXiv · 2026
- Pattern-Guided Graph Synthesis for Suppressing Known Defects in DL Compiler FuzzingarXiv · 2026
- torchtest2: One-Call Sanity Checks for PyTorch Models,Evaluated on Real and Unseen ArchitecturesarXiv · 2026
- Critical Compilation Strictness for Certified Selective Hardening Against Compiler-Conditioned DNN BackdoorsElectronics · 2026
- DLCB: Ahead-of-Time Compilation for Dynamic Deep LearningarXiv · 2026
- The Output-Space Hypothesis: Enumerative Equivalence Checking for Tensor ProgramsarXiv · 2026