paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Finding Bugs in MLIR Compiler Infrastructure via Lowering Space Exploration

通过 Lowering 空间探索发现 MLIR 编译器基础设施中的缺陷
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 5/10 · 论文研究 MLIR 编译器的缺陷检测,MLIR 是机器学习系统的重要编译基础设施,与用户关注的机器学习系统方向有间接关联;但核心方法为动态差分测试而非静态分析,也未涉及浮点分析、贝叶斯程序分析或 LLM/Agent 交叉,因此与用户核心研究方向匹配度中等。引用 0 inbox
Jingjing Liang, Shan Huang, Ting Su
crossref: 2026-09-12

AI 速览

一句话:提出 lowering 空间探索技术,动态构造多样 lowering 路径并比较执行结果,自动发现 MLIR 中的缺陷。

MLIR 是被广泛采用的编译器基础设施,支持多级 IR 与可复用组件,其正确性至关重要,因为缺陷会传播到下游系统。MLIR 通过可配置的 pass 序列将高层程序逐步 lowering 到低层表示,同一程序往往存在多条合法 lowering 路径,由此产生 lowering 等价性:同一 MLIR 程序的所有合法 lowering 路径应产生语义等价的结果。本文利用该性质提出 lowering 空间探索来有效测试 MLIR 基础设施:方法以自适应、逐步的方式动态构造多样的 lowering 路径,并借助基于反馈的调度机制进行选择,通过比较不同路径的执行结果来发现缺陷,任何不一致都提示 MLIR 基础设施中可能存在 bug。作者将该方法实现为工具 LOBE,并在最新 MLIR 版本上评估,共发现 38 个此前未知的缺陷,其中 8 个为误编译、30 个为崩溃,25 个已被确认或修复。据作者所知,这是首个从探索编译空间角度测试 MLIR 的工作。

问题
MLIR 允许同一程序存在多条合法 lowering 路径,理论上它们应语义等价,但实现中的缺陷会破坏这一性质并传播到下游系统。
方法
提出 lowering 空间探索:用基于反馈的调度机制自适应地逐步构造多样的 lowering 路径,并比较各路径的执行结果来识别不一致,从而定位潜在缺陷。
评估
实现工具 LOBE,在最新 MLIR 版本上评估,发现 38 个未知缺陷(8 个误编译、30 个崩溃),其中 25 个已确认或修复。
原文摘要(Abstract)

MLIR is a widely adopted compiler infrastructure that supports multi-level IRs and reusable components. Ensuring its correctness is critical, as bugs can propagate to downstream systems. MLIR provides a lowering mechanism that transforms high-level programs into low-level representations through configurable sequences of passes, and allows multiple valid lowering paths for a given program. This gives rise to a lowering equivalence property: all valid lowering paths for the same MLIR program should produce semantically equivalent results. In this paper, we leverage this property and propose lowering space exploration, to effectively test the MLIR infrastructure. Our approach dynamically constructs diverse lowering paths in an adaptive, stepwise manner using a feedback-based scheduling mechanism. It finds bugs by comparing the execution results across these paths. Any inconsistencies indicate potential bugs in the MLIR infrastructure. To the best of our knowledge, this is the first work to test MLIR from the perspective of exploring its compilation space. We implement our approach in a tool named LOBE and evaluate it on latest MLIR versions. LOBE discovers 38 previously unknown bugs, including 8 miscompilations and 30 crash bugs, with 25 confirmed/fixed.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9325,
  title = {Finding Bugs in MLIR Compiler Infrastructure via Lowering Space Exploration},
  author = {Jingjing Liang and Shan Huang and Ting Su},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00059}
}