paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DESIL: Detecting Silent Bugs in MLIR Compiler Infrastructure

DESIL:检测 MLIR 编译器基础设施中的静默缺陷
OOPSLA 9(OOPSLA2)2025匹配度 3/10 · 论文研究 MLIR 编译器的静默优化错误检测,属于编译器测试/差分测试方向,与用户核心关注的 LLM/Agent 与静态分析交叉、浮点程序分析、贝叶斯程序分析均不直接匹配;仅因 MLIR 常用于深度学习编译器基础设施而与 PL/AI 系统有微弱关联。引用 2 inbox
Chenyao Suo, Jianrong Wang, Yongjia Wang, Jiajun Jiang, Qingchao Shen, Junjie Chen
crossref: 2026-09-10

AI 速览

一句话:提出 DESIL,通过 UB 消除、lowering 路径优化与差分测试检测 MLIR 编译器的静默优化错误。

MLIR 编译器基础设施广泛用于语言与 DSL,但现有 fuzzing 技术无法检测静默缺陷,即编译器悄悄错误优化代码。DESIL 从 MLIR 文档定义 UB 消除规则,生成无未定义行为程序;设计 lowering 路径优化策略,将方言转为可执行形式;并引入差分测试,通过操作感知的优化推荐在编译过程生成多样化可执行文件。在最新 MLIR 修订版上评估,检测到 23 个静默缺陷和 19 个崩溃缺陷,其中 17/16 已确认或修复。

问题
现有 MLIR 编译器 fuzzing 技术难以检测静默缺陷,即编译器静默地错误优化代码,同时还需解决无 UB 程序生成与高效 lowering 支持问题。
方法
DESIL 基于 MLIR 文档定义 UB 消除规则,设计 lowering 路径优化策略,并采用操作感知优化推荐的差分测试来生成多样化可执行文件。
评估
在最新 MLIR 修订版上评估,检测到 23 个静默缺陷和 19 个崩溃缺陷,其中 17 个和 16 个分别被确认或修复。
原文摘要(Abstract)

MLIR (Multi-Level Intermediate Representation) compiler infrastructure provides an efficient framework for introducing a new abstraction level for programming languages and domain-specific languages. It has attracted widespread attention in recent years and has been applied in various domains, such as deep learning compiler construction. Recently, several MLIR compiler fuzzing techniques, such as MLIRSmith and MLIRod, have been proposed. However, none of them can detect silent bugs, i.e., bugs that incorrectly optimize code silently. The difficulty in detecting silent bugs arises from two main aspects: (1) UB-Free Program Generation : Generates programs that are free from undefined behaviors to suit the non-UB assumptions required by compiler optimizations. (2) Lowering Support : Converts the given MLIR program into an executable form with a suitable lowering path that reduces redundant lowering passes and improves the efficiency of fuzzing. To address the above issues, we propose DESIL. DESIL enables silent bug detection by defining a set of UB-elimination rules based on the MLIR documentation and applying them to input programs. To convert dialects in the MLIR program into executable form, DESIL designs a lowering path optimization strategy to convert the dialects in the given MLIR program into executable form. Furthermore, DESIL incorporates the differential testing for silent bug detection. It introduces an operation-aware optimization recommendation strategy into the compilation process to generate diverse executable files. We applied DESIL to the latest revisions of the MLIR compiler infrastructure. It detected 23 silent bugs and 19 crash bugs, of which 17/16 have been confirmed or fixed.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2983,
  title = {DESIL: Detecting Silent Bugs in MLIR Compiler Infrastructure},
  author = {Chenyao Suo and Jianrong Wang and Yongjia Wang and Jiajun Jiang and Qingchao Shen and Junjie Chen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763161}
}