Performance modeling is an essential tool in many areas, including performance characterization/optimization, design space exploration, and resource allocation problems, to name a few. However, existing performance modeling approaches have limitations, such as high computational cost for discrete-event simulators, narrow flexibility of hardware emulators, or restricted accuracy/generality of analytical/data-driven models. To address these limitations, this paper proposes PerfVec, a novel deep learning-based performance modeling framework that learns high-dimensional and independent/orthogonal program and microarchitecture representations. Once learned, a program representation can be used to predict its performance on any microarchitecture, and likewise, a microarchitecture representation can be applied in the performance prediction of any program. Additionally, PerfVec yields a foundation model that captures the performance essence of instructions, which can be directly used by developers in numerous performance modeling related tasks without incurring its training cost. The evaluation demonstrates that PerfVec is more general and efficient than previous approaches.
翻译:性能建模是许多领域中的关键工具,包括性能表征/优化、设计空间探索和资源分配问题等。然而,现有性能建模方法存在诸多局限,例如离散事件模拟器的高计算成本、硬件模拟器的灵活性不足,或分析/数据驱动模型在准确性/通用性上的限制。为应对这些挑战,本文提出PerfVec——一种基于深度学习的新型性能建模框架,该框架能够学习高维且独立/正交的程序与微架构表示。一旦习得,程序表示可用于预测其在任意微架构上的性能,反之,微架构表示亦可应用于任意程序的性能预测。此外,PerfVec构建了一个能捕捉指令性能本质的基础模型,开发者可直接将其应用于众多性能建模相关任务,而无需承担模型训练成本。评估结果表明,PerfVec相比现有方法具有更优的通用性与效率。