一句话:提出 AnICA,用差分测试与抽象解释系统分析微架构代码分析器之间的不一致并归纳原因。
微架构代码分析器用于估计机器码基本块的吞吐量,但 llvm-mca、uiCA、Ithem al 等先进工具对同一代码常给出不同结果,这些不一致可能是错误,也可能源于未文档化的建模假设。本文提出 AnICA,借鉴差分测试与抽象解释,系统分析此类工具间的不一致。该方法通过收集、比较并抽象概括这些不一致,将大量结果汇总为少量高层描述。评估表明,AnICA 能将数千条不一致压缩为几十条可解释描述,揭示工具行为差异;案例研究还自动发现并刻画了 llvm-mca 中已知与未知缺陷,以及 AMD Zen 微架构的一个特殊行为。
Microarchitectural code analyzers, i.e., tools that estimate the throughput of machine code basic blocks, are important utensils in the tool belt of performance engineers. Recent tools like llvm-mca, uiCA, and Ithemal use a variety of techniques and different models for their throughput predictions. When put to the test, it is common to see these state-of-the-art tools give very different results. These inconsistencies are either errors, or they point to different and rarely documented assumptions made by the tool designers. In this paper, we present AnICA, a tool taking inspiration from differential testing and abstract interpretation to systematically analyze inconsistencies among these code analyzers. Our evaluation shows that AnICA can summarize thousands of inconsistencies in a few dozen descriptions that directly lead to high-level insights into the different behavior of the tools. In several case studies, we further demonstrate how AnICA automatically finds and characterizes known and unknown bugs in llvm-mca, as well as a quirk in AMD's Zen microarchitectures.
@article{paperbot1410,
title = {AnICA: analyzing inconsistencies in microarchitectural code analyzers},
author = {Fabian Ritter and Sebastian Hack},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {OOPSLA2},
year = {2022},
doi = {10.1145/3563288}
}