[论文解读] Learning Memory Access Patterns
本论文研究基于 LSTM 的神经预测器用于内存访问,将预测预取建模为对增量(delta)和程序计数器(PC)的分类任务,并在多种基准上显示出相较于传统硬件预测器的精度和召回率提升。
The explosion in workload complexity and the recent slow-down in Moore's law scaling call for new approaches towards efficient computing. Researchers are now beginning to use recent advances in machine learning in software optimizations, augmenting or replacing traditional heuristics and data structures. However, the space of machine learning for computer hardware architecture is only lightly explored. In this paper, we demonstrate the potential of deep learning to address the von Neumann bottleneck of memory performance. We focus on the critical problem of learning memory access patterns, with the goal of constructing accurate and efficient memory prefetchers. We relate contemporary prefetching strategies to n-gram models in natural language processing, and show how recurrent neural networks can serve as a drop-in replacement. On a suite of challenging benchmark datasets, we find that neural networks consistently demonstrate superior performance in terms of precision and recall. This work represents the first step towards practical neural-network based prefetching, and opens a wide range of exciting directions for machine learning in computer architecture research.
研究动机与目标
- 激发记忆墙挑战以及超越基于表格的硬件预测器的可扩展预测技术的需求。
- 研究序列模型(特别是 LSTM)是否能预测内存缺失以引导预取。
- 开发两种基于 LSTM 的预取器架构并评估其可用性和准确性。
- 在现实基准跟踪中将神经预取器与传统硬件预取器进行比较。
- 提供对内存访问轨迹学习结构的洞察以及潜在的硬件融合方向。
提出的方法
- 通过将地址空间视为增量值或簇的词汇表,将预取建模为离散分类问题。
- 开发以输入 PC 和增量为特征的嵌入式 LSTM,并输出前 10 个增量预测用于预取。
- 开发聚类 + LSTM,用共享权重和聚类ID作为特征,对地址空间的局部区域进行建模。
- 使用 SPEC CPU2006 基准和 Google 网页搜索工作负载的离线跟踪进行训练,采用 70/30 的训练/测试划分。
- 与一个 10 流硬件预取器和一个 GHB PC/DC 相关性预取器进行比较,评估 precision-at-10 和 recall-at-10。
- 使用增量(Addr_{N+1}-Addr_N)作为输入,以提高一致性并在簇内减少词汇表大小。
实验结果
研究问题
- RQ1序列模型(LSTM)是否能在内存访问的精度和召回率方面超越传统硬件预取器?
- RQ2通过增量或聚类地址离散化输出空间,能否在现实硬件规模下实现有效的神经预取?
- RQ3输入模态(PCs 与增量)如何为预取提供预测信息?
- RQ4基于嵌入的 LSTM 与基于聚类的 LSTM 在准确性、模型大小和内存访问局部性方面有哪些权衡?
主要发现
- 神经网络预取器在多个基准上实现了高于传统硬件预取器的精度和召回率。
- 嵌入式 LSTM 与聚类 + LSTM 在精度方面表现相当,而聚类 + LSTM 由于多个词汇表导致召回率更高。
- 使用增量作为输入为精度提供最具预测性的信息,而 PC 有助于召回。
- 将地址空间聚类为区域可减少词汇表大小和模型占用,支持具有共享权重的多任务 LSTM。
- 模型在学习表示中展示可解释的结构(例如 t-SNE 可视化揭示代码模式语义)。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。