[论文解读] Accurate Throughput Prediction of Basic Blocks on Recent Intel Microarchitectures.
本论文提出了一种高精度模拟器,通过使用微基准测试反向逆向工程未公开的流水线细节,以预测近期英特尔微架构上基本块的吞吐量。通过建模执行单元、端口约束和资源争用等关键流水线组件,该方法在预测精度上相比现有最先进工具实现了十余倍的提升,并支持过去十年内所有英特尔酷睿微架构。
Tools to predict the throughput of basic blocks on a specific microarchitecture are useful to optimize software performance and to build optimizing compilers. In recent work, several such tools have been proposed. However, the accuracy of their predictions has been shown to be relatively low. In this paper, we identify the most important factors for these inaccuracies. To a significant degree these inaccuracies are due to elements and parameters of the pipelines of recent CPUs that are not taken into account by previous tools. A primary reason for this is that the necessary details are often undocumented. In this paper, we build more precise models of relevant components by reverse engineering using microbenchmarks. Based on these models, we develop a simulator for predicting the throughput of basic blocks. In addition to predicting the throughput, our simulator also provides insights into how the code is executed. Our tool supports all Intel Core microarchitecture generations released in the last decade. We evaluate it on an improved version of the BHive benchmark suite. On many recent microarchitectures, its predictions are more accurate than the predictions of state-of-the-art tools by more than an order of magnitude.
研究动机与目标
- 解决现有工具在预测现代英特尔微架构上基本块吞吐量时精度不足的问题。
- 识别并建模此前未公开的流水线特性(如端口约束和资源共享),这些特性是导致预测误差的主要原因。
- 开发一种模拟器,不仅能以高精度预测吞吐量,还能揭示底层执行行为的细节。
- 支持过去十年内发布的全部英特尔酷睿微架构,以确保广泛适用性。
- 通过提供准确的低级别性能建模,提升编译器优化与性能调优能力。
提出的方法
- 使用自定义微基准测试反向逆向工程近期英特尔微架构的关键流水线组件,以揭示未公开的行为特征。
- 通过在受控条件下测量指令级性能,构建执行单元、端口和资源争用的详细模型。
- 将这些模型集成到一个周期精确的模拟器中,以模拟目标微架构上基本块的执行过程。
- 通过模拟指令调度、资源分配和流水线冒险行为,利用模拟器预测吞吐量。
- 通过将预测结果与增强版BHive基准测试套件的实际测量结果进行对比,验证模型的准确性。
- 通过在模拟过程中追踪端口使用情况、资源冲突和指令级依赖关系,暴露执行细节。
实验结果
研究问题
- RQ1近期英特尔微架构中哪些未公开的流水线特性最显著地降低了现有吞吐量预测工具的准确性?
- RQ2反向工程的微基准测试在多大程度上能够重建执行单元行为和端口约束的准确模型?
- RQ3与现有工具相比,详细流水线建模的引入在多大程度上提升了吞吐量预测的准确性?
- RQ4所提出的模拟器能否在最近十年内所有英特尔酷睿微架构上实现泛化?
- RQ5通过模拟器内部状态分析,可以得出关于底层执行行为的哪些洞察?
主要发现
- 先前工具精度不足的主要原因是忽略了未公开的流水线特性,如端口级约束和资源共享行为。
- 反向工程的模型成功捕捉了关键的流水线细节,包括端口争用和执行单元限制,这些在以往未被充分考虑。
- 该模拟器在许多近期英特尔微架构上,相比现有最先进工具,吞吐量预测精度提升了逾十倍。
- 该工具支持过去十年内发布的全部英特尔酷睿微架构,确保了广泛的兼容性和实际应用价值。
- 除吞吐量预测外,该模拟器还提供了关于指令级执行的可操作洞察,如端口使用情况和资源冲突,有助于低级别性能分析。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。