arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.06362cs.NEcs.ARcs.LGcs.OS
收藏

注意力、蒸馏与表格化:迈向实用的基于神经网络的预取

Attention, Distillation, and Tabularization: Towards Practical Neural Network-Based Prefetching

University of Southern California(南加州大学);DEVCOM Army Research Lab(DEVCOM陆军研究实验室)

Pengmiao Zhang, Neelesh Gupta, Rajgopal Kannan, Viktor K. Prasanna

AI总结:

本文提出基于表格化的方法,将蒸馏后的注意力预取模型转换为快速查表层级结构,并实现 DART 预取器,在几乎不损失准确率的情况下大幅降低推理延迟和计算开销,IPC 提升显著超过现有规则与神经网络预取器。

摘要:

基于注意力的神经网络(NN)已在准确的内存访问预测中展现出有效性,而内存访问预测是数据预取中的关键步骤。然而,这些模型带来的巨大计算开销导致较高的推理延迟,限制了它们作为实用预取器的可行性。为弥合这一差距,我们提出了一种基于表格化的新方法,在不牺牲预测准确率的前提下显著降低模型复杂度和推理延迟。我们的新型表格化方法以一个经过蒸馏但依然高度准确的、用于内存访问预测的注意力模型为输入,并将其昂贵的矩阵乘法高效转换为层级化的快速查表操作。作为上述方法的一个示例,我们开发了 DART,一个由简单表层级结构组成的预取器。在 F1 分数仅下降 0.09 的情况下,DART 将大型注意力模型的算术运算减少了 99.99%,并将蒸馏模型的算术运算减少了 91.83%。DART 将大型模型的推理加速了 170 倍,将蒸馏模型加速了 9.4 倍。DART 的延迟和存储成本与最先进的基于规则的预取器 BO 相当,但在 IPC 提升上超过 BO 6.1%。DART 在 IPC 提升方面分别比最先进的基于神经网络的预取器 TransFetch 和 Voyager 高出 33.1% 和 37.2%,这主要得益于其较低的预取延迟。

英文摘要:

Attention-based Neural Networks (NN) have demonstrated their effectiveness in accurate memory access prediction, an essential step in data prefetching. However, the substantial computational overheads associated with these models result in high inference latency, limiting their feasibility as practical prefetchers. To close the gap, we propose a new approach based on tabularization that significantly reduces model complexity and inference latency without sacrificing prediction accuracy. Our novel tabularization methodology takes as input a distilled, yet highly accurate attention-based model for memory access prediction and efficiently converts its expensive matrix multiplications into a hierarchy of fast table lookups. As an exemplar of the above approach, we develop DART, a prefetcher comprised of a simple hierarchy of tables. With a modest 0.09 drop in F1-score, DART reduces 99.99% of arithmetic operations from the large attention-based model and 91.83% from the distilled model. DART accelerates the large model inference by 170x and the distilled model by 9.4x. DART has comparable latency and storage costs as state-of-the-art rule-based prefetcher BO but surpasses it by 6.1% in IPC improvement. DART outperforms state-of-the-art NN-based prefetchers TransFetch by 33.1% and Voyager by 37.2% in terms of IPC improvement, primarily due to its low prefetching latency.

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

↑