arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.12672cs.DC
收藏

CPU-GPU统一虚拟内存中基于深度学习的数据预取

Deep Learning based Data Prefetching in CPU-GPU Unified Virtual Memory

Xinjian Long, Xiangyang Gong, Huiyang Zhou

摘要:

统一虚拟内存(UVM)支持CPU内存和GPU内存之间的按需数据移动,从而减轻了开发人员维护复杂数据结构和显式数据迁移的负担。然而,按需分页很快成为UVM的性能瓶颈,由于页表遍历和互连上的数据迁移引起的高延迟。预取被认为是一个很有前途的解决方案,这个问题的能力,利用程序的内存访问模式的局部性。然而,现有的基于位置的预取方案不能处理所有的情况。%像数组这样的数据结构倾向于存储在连续的块中,并重复访问。一个理想的预取器不仅应该查看所请求的地址空间的狭窄区域,而且还应该捕获全局上下文以提供对存储器访问模式的良好预测。提出了一种基于深度学习的UVM页面预取方法。我们首先展示了一个强大的Transformer学习模型可以为UVM页面预取提供高精度。然后,我们执行分析来解释这个Transformer模型,并得出一些见解,使我们能够设计一个更简单的模型,以匹配无约束模型的精度与数量级更低的成本。我们评估这个简化的模型上的一组11个内存密集型的基准测试,从流行的基准套件。我们的解决方案优于最先进的UVM框架,将性能提高了10.89%,将设备内存页面命中率提高了16.98%(89.02%,而现有技术为76.10%),并将CPU-GPU互连流量减少了11.05%。根据我们提出的统一指标,它结合了准确性,覆盖率和页面命中率,我们的解决方案比最先进的设计更接近理想的预取方案(0.90 vs. 0.85,完美的预取器为1.0)。

英文摘要:

Unified Virtual Memory (UVM) relieves the developers from the onus of maintaining complex data structures and explicit data migration by enabling on-demand data movement between CPU memory and GPU memory. However, on-demand paging soon becomes a performance bottleneck of UVM due to the high latency caused by page table walks and data migration over interconnect. Prefetching is considered a promising solution to this problem given its ability to leverage the locality of program memory access patterns. However, existing locality-based prefetching schemes can not handle all the situations. %Data structures like arrays tend to be stored in contiguous blocks, and accessed repeatedly. An ideal prefetcher should not only look at narrow regions of the requested address space but also capture global context to deliver a good prediction of the memory access pattern. This paper proposes a novel approach for page prefetching for UVM through deep learning. We first show that a powerful Transformer learning model can provide high accuracy for UVM page prefetching. We then perform analysis to interpret this Transformer model and derive several insights that allow us to design a simpler model to match the unconstrained model's accuracy with orders of magnitude lower cost. We evaluate this simplified model on a set of 11 memory-intensive benchmarks from popular benchmark suites. Our solution outperforms the state-of-the-art UVM framework, improving the performance by 10.89%, improving the device memory page hit rate by 16.98% (89.02% vs. 76.10% for prior art), and reducing the CPU-GPU interconnect traffic by 11.05%. According to our proposed unified metric, which combines the accuracy, coverage, and page hit rate, our solution is approaching the ideal prefetching scheme more than the state-of-the-art design (0.90 vs. 0.85, with the perfect prefetcher of 1.0).

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

↑