一句话:提出统一数据驱动测试框架,面向 AI 编译器各阶段生成测试,发现 266 个未知缺陷。
AI 编译器对将模型高效部署到多样硬件至关重要,但其自身缺陷会危及编译器可靠性与模型正确性。本文提出一个统一的数据驱动测试框架,系统应对 AI 编译器不同阶段的测试挑战:OPERA 将 AI 库测试迁移用于模型加载阶段的算子转换逻辑测试;OATest 合成多样化且优化感知的计算图,以测试高层优化;HARMONY 生成并变异多样的低层 IR 种子,以生成硬件优化感知的测试。三者结合形成阶段感知的综合测试框架,提升了测试覆盖率和有效性,在四个广泛使用的 AI 编译器中检测到 266 个此前未知的缺陷。
Artificial Intelligence (AI) compilers are critical for efficiently deploying AI models across diverse hardware platforms. However, they remain prone to bugs that can compromise both compiler reliability and model correctness. Thus, ensuring the quality of AI compilers is crucial. In this work, we present a unified data-driven testing framework that systematically addresses stage-specific challenges in AI compilers. Specifically, OPERA migrates tests for AI libraries to test various operator conversion logic in the model loading stage. OATest synthesizes diverse optimization-aware computational graphs for testing high-level optimizations. HARMONY generates and mutates diverse low-level IR seeds to generate hardware-optimization-aware tests for testing low-level optimizations. Together, these techniques provide a comprehensive, stage-aware framework that enhances testing coverage and effectiveness, detecting 266 previously unknown bugs in four widely used AI compilers.