使用预测切片的语义预取
Semantic prefetching using forecast slices
摘要:
现代预取器识别内存访问模式,以预测未来的访问。然而,许多应用程序表现出不规则的访问模式,不表现在内存地址空间的时空局部性。这样的应用程序通常不属于现有的预取技术的范围,这些技术只观察由存储器单元分派的地址流,而不是产生它们的代码流。类似地,时间相关预取器检测访问之间的重复关系,但不跟踪程序代码中表现存储器局部性的因果关系链。相反,代码感知的技术仅限于基本的程序功能,并受到机器深度的限制。在本文中,我们表明,生成内存访问的代码流的上下文分析可以检测到经常性的代码模式,并暴露其底层的语义,即使是不规则的访问模式。此外,程序局部性工件可以用于增强存储器遍历代码和预测未来的访问。我们提出的语义预取器,分析程序在运行时,并学习他们的内存依赖链和地址计算流程。预取器然后构造预测切片并在关键点处注入它们以触发未来上下文相关迭代的及时预取。我们展示了这种方法如何两全其美,增强代码注入预测功能,并依赖于基于上下文的时间相关性的代码片。这种组合使我们能够克服目前任何其他预取器都无法覆盖的关键内存延迟。我们使用工业级,周期精确的x86模拟器对语义预取器进行的评估表明,它比SPEC 2006平均提高了24%(异常值高达3.7倍),比SPEC 2017平均提高了16%(异常值高达1.85倍),仅使用约6KB。
英文摘要:
Modern prefetchers identify memory access patterns in order to predict future accesses. However, many applications exhibit irregular access patterns that do not manifest spatio-temporal locality in the memory address space. Such applications usually do not fall under the scope of existing prefetching techniques, which observe only the stream of addresses dispatched by the memory unit but not the code flows that produce them. Similarly, temporal correlation prefetchers detect recurring relations between accesses, but do not track the chain of causality in program code that manifested the memory locality. Conversely, techniques that are code-aware are limited to the basic program functionality and are bounded by the machine depth. In this paper we show that contextual analysis of the code flows that generate memory accesses can detect recurring code patterns and expose their underlying semantics even for irregular access patterns. Moreover, program locality artifacts can be used to enhance the memory traversal code and predict future accesses. We present the semantic prefetcher that analyzes programs at run-time and learns their memory dependency chains and address calculation flows. The prefetcher then constructs forecast slices and injects them at key points to trigger timely prefetching of future contextually-related iterations. We show how this approach takes the best of both worlds, augmenting code injection with forecast functionality and relying on context-based temporal correlation of code slices. This combination allows us to overcome critical memory latencies that are currently not covered by any other prefetcher. Our evaluation of the semantic prefetcher using an industrial-grade, cycle-accurate x86 simulator shows that it improves performance by 24% on average over SPEC 2006 (outliers up to 3.7x), and 16% on average over SPEC 2017 (outliers up to 1.85x), using only ~6KB.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。