arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.08880cs.ARcs.AIcs.LGcs.PL
收藏

NPS:一种使用图神经网络进行精确程序采样的框架

NPS: A Framework for Accurate Program Sampling Using Graph Neural Network

DAMO Academy, Alibaba Group(阿里巴巴集团达摩院);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Cornell University(康奈尔大学);Fudan University(复旦大学)

Yuanwei Fang, Zihao Liu, Yanheng Lu, Jiawei Liu, Jiajie Li, Yi Jin, Jian Chen, Yenkuang Chen, Hongzhong Zheng, Yuan Xie

AI总结:

本文提出神经程序采样框架 NPS,利用图神经网络 AssemblyNet 学习程序执行嵌入,以替代 SimPoint 进行代表性仿真点选择,在降低平均误差 38% 的同时显著减少人工调优开销。

摘要:

随着摩尔定律的终结,现代处理器(如 RISC-V 自定义扩展)对快速架构创新的需求日益增长,以继续实现性能扩展。程序采样是微处理器设计中的关键步骤,因为它为工作负载仿真选择具有代表性的仿真点。虽然 SimPoint 几十年来一直是事实上的标准方法,但其基于基本块向量(Basic Block Vector,BBV)的表达能力有限,需要耗时的人工调优,通常需要数月时间,这阻碍了快速创新和敏捷硬件开发。本文介绍了神经程序采样(Neural Program Sampling,NPS),这是一种新颖的框架,利用图神经网络(Graph Neural Network)的动态快照学习执行嵌入。NPS 部署 AssemblyNet 进行嵌入生成,利用应用程序的代码结构和运行时状态。AssemblyNet 作为 NPS 的图模型和神经架构,在数据计算、代码路径和数据流等方面捕捉程序的行为。AssemblyNet 通过预测连续内存地址的数据预取任务进行训练。在实验中,NPS 的性能比 SimPoint 高出最多 63%,平均误差降低了 38%。此外,NPS 表现出强大的鲁棒性和更高的准确性,降低了昂贵的精度调优开销。此外,与最先进的 GNN 代码行为学习方法相比,NPS 显示出更高的准确性和通用性,能够生成高质量的执行嵌入。

英文摘要:

With the end of Moore's Law, there is a growing demand for rapid architectural innovations in modern processors, such as RISC-V custom extensions, to continue performance scaling. Program sampling is a crucial step in microprocessor design, as it selects representative simulation points for workload simulation. While SimPoint has been the de-facto approach for decades, its limited expressiveness with Basic Block Vector (BBV) requires time-consuming human tuning, often taking months, which impedes fast innovation and agile hardware development. This paper introduces Neural Program Sampling (NPS), a novel framework that learns execution embeddings using dynamic snapshots of a Graph Neural Network. NPS deploys AssemblyNet for embedding generation, leveraging an application's code structures and runtime states. AssemblyNet serves as NPS's graph model and neural architecture, capturing a program's behavior in aspects such as data computation, code path, and data flow. AssemblyNet is trained with a data prefetch task that predicts consecutive memory addresses. In the experiments, NPS outperforms SimPoint by up to 63%, reducing the average error by 38%. Additionally, NPS demonstrates strong robustness with increased accuracy, reducing the expensive accuracy tuning overhead. Furthermore, NPS shows higher accuracy and generality than the state-of-the-art GNN approach in code behavior learning, enabling the generation of high-quality execution embeddings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑