CAPSim:一种使用基于注意力预测器的快速CPU性能模拟器
CAPSim: A Fast CPU Performance Simulator Using Attention-based Predictor
AI总结:
本文提出基于注意力机制的CPU性能模拟器CAPSim,通过指令轨迹采样和注意力机制捕获长距离依赖,在保持预测精度的同时,相比gem5实现了2.2至8.3倍的加速。
摘要:
CPU模拟器对于计算机架构研究至关重要,主要用于估计不同程序下的性能。这对现代CPU的快速准确模拟提出了挑战,尤其是在多核系统中。诸如GEM5等现代CPU性能模拟器采用周期精确和事件驱动的方法,在乱序CPU上运行真实基准测试时,模拟其广泛的微架构行为非常耗时。最近,基于机器学习的方法被提出以提高模拟速度,但目前仅限于估计基本块的周期,而非完整的基准测试程序。本文提出了一种新颖的基于ML的CPU模拟器,名为CAPSim,它使用基于注意力的神经网络性能预测器和带有上下文注释的指令轨迹采样方法。注意力机制有效捕获指令轨迹内的长距离影响,强调关键上下文信息。这使得模型能够通过关注重要的代码指令来提高性能预测准确性。与使用gem5构建的精确O3模拟器相比,CAPSim能以显著更快的速度预测未见基准测试的执行时间。我们在商用Intel Xeon CPU上的评估表明,与使用gem5构建的模拟器相比,CAPSim实现了2.2至8.3倍的加速,优于前沿的深度学习方法。
英文摘要:
CPU simulators are vital for computer architecture research, primarily for estimating performance under different programs. This poses challenges for fast and accurate simulation of modern CPUs, especially in multi-core systems. Modern CPU peformance simulators such as GEM5 adopt the cycle-accurate and event-driven approach, which is timeconsuming to simulate the extensive microarchitectural behavior of a real benchmark running on out-of-order CPUs. Recently, machine leaning based approach has been proposed to improve simulation speed, but they are currently limited to estimating the cycles of basic blocks rather than the complete benchmark program. This paper introduces a novel ML-based CPU simulator named CAPSim, which uses an attention-based neural network performance predictor and instruction trace sampling method annotated with context. The attention mechanism effectively captures long-range influence within the instruction trace, emphasizing critical context information. This allows the model to improve performance prediction accuracy by focusing on important code instruction. CAPSim can predict the execution time of unseen benchmarks at a significantly fast speed compared with an accurate O3 simulator built with gem5. Our evaluation on a commercial Intel Xeon CPU demonstrates that CAPSim achieves a 2.2 - 8.3x speedup compared to using gem5 built simulator, which is superior to the cutting-edge deep learning approach
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。