Skip to main content
QUICK REVIEW

[论文解读] GraphCage: Cache Aware Graph Processing on GPUs

Xuhao Chen|arXiv (Cornell University)|Apr 3, 2019
Graph Theory and Algorithms参考文献 36被引用 4
一句话总结

GraphCage 是一种面向高效 GPU 图处理的缓存感知优化框架,引入了一种面向吞吐量的缓存分块方案(TOCAB),以提升数据局部性并降低内存延迟。通过利用基于 CSR 的图表示形式与 GPU 最后一级缓存(LLC)协同工作,并结合负载均衡策略,GraphCage 在内存使用更低的情况下,相比手工优化的实现以及 Gunrock 和 CuSha 等最先进的框架,实现了 2–4× 的加速。

ABSTRACT

Efficient Graph processing is challenging because of the irregularity of graph algorithms. Using GPUs to accelerate irregular graph algorithms is even more difficult to be efficient, since GPU's highly structured SIMT architecture is not a natural fit for irregular applications. With lots of previous efforts spent on subtly mapping graph algorithms onto the GPU, the performance of graph processing on GPUs is still highly memory-latency bound, leading to low utilization of compute resources. Random memory accesses generated by the sparse graph data structure are the major causes of this significant memory access latency. Simply applying the conventional cache blocking technique proposed for matrix computation have limited benefit due to the significant overhead on the GPU. We propose GraphCage, a cache centric optimization framework for highly efficient graph processing on GPUs. We first present a throughput-oriented cache blocking scheme (TOCAB) in both push and pull directions. Comparing with conventional cache blocking which suffers repeated accesses when processing large graphs on GPUs, TOCAB is specifically optimized for the GPU architecture to reduce this overhead and improve memory access efficiency. To integrate our scheme into state-of-the-art implementations without significant overhead, we coordinate TOCAB with load balancing strategies by considering the sparsity of subgraphs. To enable cache blocking for traversal-based algorithms, we consider the benefit and overhead in different iterations with different working set sizes, and apply TOCAB for topology-driven kernels in pull direction. Evaluation shows that GraphCage can improve performance by 2 ~ 4x compared to hand optimized implementations and state-of-the-art frameworks (e.g. CuSha and Gunrock), with less memory consumption than CuSha.

研究动机与目标

  • 解决稀疏图工作负载中由于不规则、随机内存访问导致的 GPU 图处理中数据局部性差的问题。
  • 克服先前 GPU 缓存分块技术的局限性,这些技术因高开销和低效的内存访问模式而表现不佳。
  • 设计一种面向 GPU 的缓存分块方案,以在不牺牲性能或增加内存占用的前提下提升内存访问效率。
  • 将缓存分块与负载均衡策略相结合,以应对迭代过程中子图稀疏性及工作集大小的变化。
  • 通过根据拉取式内核中动态工作集变化调整分块策略,实现遍历式图算法中有效缓存利用。

提出的方法

  • 提出一种面向吞吐量的缓存分块(TOCAB)方案,通过将稀疏全局内存访问替换为密集的部分和访问,以提升 GPU 上的内存访问效率。
  • 将 GPU 的最后级缓存(LLC)用作工作集缓存,而非依赖共享内存,从而避免因过度划分子图带来的开销。
  • 采用 CSR(压缩稀疏行)格式,与 Gunrock 等先前框架所使用的 COO 表示形式相比,可显著减少全局内存使用。
  • 通过分析子图稀疏性,将 TOCAB 与动态负载均衡协调,以最小化 GPU warp 之间的负载不平衡。
  • 在拉取模式遍历内核中选择性应用 TOCAB,因为这些内核在迭代间工作集大小变化显著,可最大化缓存收益。
  • 设计一种静态缓存分块策略,通过与 GPU 内存层次结构和缓存行大小对齐数据访问模式,避免重复缓存未命中。

实验结果

研究问题

  • RQ1是否能够通过缓存感知优化框架在不增加内存占用的前提下,改善 GPU 图处理中的数据局部性并降低内存延迟?
  • RQ2在共享内存有限且稀疏图中随机访问影响重大的情况下,如何有效适应缓存分块技术与 GPU 内存层次结构?
  • RQ3在工作集大小动态变化的不规则图工作负载中,将缓存分块与负载均衡协调使用,其性能影响如何?
  • RQ4与传统缓存分块方法及现有 GPU 图处理框架相比,TOCAB 在加速比和内存效率方面表现如何?
  • RQ5TOCAB 是否能有效应用于图遍历算法中的推送和拉取两个方向,特别是在拓扑驱动的内核中?

主要发现

  • GraphCage 在多种真实世界图上相比状态领先 GPU 图处理框架 Gunrock 实现了最高达 4× 的加速。
  • 与手工优化的 GPU 图算法实现相比,GraphCage 提升了 2–4× 的性能。
  • 通过使用 CSR 格式替代 COO 格式,GraphCage 相比 CuSha 减少了内存消耗,避免了 COO 格式带来的 2.5× 内存开销。
  • TOCAB 方案通过将稀疏访问转换为密集的部分和操作,显著减少了缓存未命中,提升了内存访问效率。
  • TOCAB 与负载均衡的协同作用,使得在不同稀疏度和动态工作集大小的图上均能实现有效的性能扩展。
  • GraphCage 证明了最后级缓存(LLC)可被有效用作 GPU 图处理中的工作集缓存,这与普遍认为其仅用于同步的假设相悖。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。