Demystifying Deep Learning Compiler Frontend Bugs: An LLM-Aided Empirical Study

📅 2026-07-28
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses a critical yet underexplored class of defects—referred to as fBugs—in the frontends of deep learning compilers during the conversion of programs into graph-based intermediate representations. Focusing on TorchDynamo, the default frontend of PyTorch 2, this work presents the first systematic empirical investigation of fBugs by leveraging a domain-knowledge-enhanced large language model to analyze 123 real-world bugs. The authors establish a comprehensive taxonomy encompassing seven root-cause categories and fifteen subcategories, and develop root-cause-aware test cases. Moving beyond conventional black-box or low-level API–centric approaches, their methodology successfully uncovers 23 previously unknown fBugs—15 of which have been confirmed—spanning eight subcategories, thereby substantially improving the robustness of compiler frontends.
📝 Abstract
Deep learning compilers (DLCs) are designed to translate deep learning programs into optimized, hardware-specific code. Typically, DLC frontends translate programs into graph-based intermediate representations (IRs) to enable optimizations. Defects introduced during this stage (termed \emph{fBug}s) are severe yet understudied, as prior work predominantly focuses on low-level APIs and operators or treats DLCs as monolithic entities. To bridge this gap, we conduct the first systematic empirical study of \emph{fBug}s in TorchDynamo, the default DLC frontend for PyTorch 2, the most popular DL framework. Leveraging a domain-knowledge-enhanced LLM-aided methodology, we analyze 123 \emph{fBug}s and construct a taxonomy comprising 7 root cause categories and 15 subcategories. Our findings provide actionable insights for DLC development and testing. Furthermore, we leverage the LLM to generate targeted, root cause-aware test cases to detect new bugs. We uncovered 23 previously unknown \emph{fBug}s in recent releases (15 confirmed) across eight (sub)categories, demonstrating the efficacy of our methodology in testing and hardening DLC frontends.
Problem

Research questions and friction points this paper is trying to address.

deep learning compiler
frontend bugs
intermediate representation
empirical study
PyTorch
Innovation

Methods, ideas, or system contributions that make the work stand out.

fBug
deep learning compiler
LLM-aided testing
frontend bug taxonomy
TorchDynamo