arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.09524cs.LGcs.PF
收藏

理解GNN计算图:协调计算、IO和内存透视图

Understanding GNN Computational Graph: A Coordinated Computation, IO, and Memory Perspective

Tsinghua University(清华大学);University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校)

Hengrui Zhang, Zhongming Yu, Guohao Dai, Guyue Huang, Yufei Ding, Yuan Xie, Yu Wang

摘要:

图神经网络(Graph Neural Network,GNN)在各个领域都有着广泛的应用,但复杂的计算图导致GNN的延迟和内存消耗较大。优化GNN计算图的缺点是:(1)冗余的神经算子计算。相同的数据通过图结构传播,在GNN中多次执行相同的神经操作,导致冗余计算,占总运算符的92.4%。(2)线程映射不一致。顶点中心和边中心算子的有效线程映射方案是不同的。这种不一致性禁止操作符融合以减少存储器IO。(3)中间数据过多。对于通常与推理同时执行的GNN训练,必须为反向传递存储中间数据,消耗总内存需求的91.9%。为了解决这些挑战,我们提出了以下设计,以优化GNN计算图,从一个新的协调计算,IO和内存的角度:(1)延迟运算符重组。我们重新组织的运营商进行神经操作之前的传播,从而消除了冗余的计算。(2)用于融合的统一线程映射。我们提出了一个统一的线程映射方案的顶点和边缘为中心的运营商,使融合和减少IO。(3)中间数据重新计算。中间数据在向后传递期间被重新计算以减少总的内存消耗。在三个典型的GNN模型上进行的大量实验结果表明,与最先进的框架相比,我们实现了高达2.75倍的端到端加速,6.89倍的内存IO和7.73倍的内存消耗。

英文摘要:

Graph Neural Networks (GNNs) have been widely used in various domains, and GNNs with sophisticated computational graph lead to higher latency and larger memory consumption. Optimizing the GNN computational graph suffers from: (1) Redundant neural operator computation. The same data are propagated through the graph structure to perform the same neural operation multiple times in GNNs, leading to redundant computation which accounts for 92.4% of total operators. (2) Inconsistent thread mapping. Efficient thread mapping schemes for vertex-centric and edge-centric operators are different. This inconsistency prohibits operator fusion to reduce memory IO. (3) Excessive intermediate data. For GNN training which is usually performed concurrently with inference, intermediate data must be stored for the backward pass, consuming 91.9% of the total memory requirement. To tackle these challenges, we propose following designs to optimize the GNN computational graph from a novel coordinated computation, IO, and memory perspective: (1) Propagation-postponed operator reorganization. We reorganize operators to perform neural operations before the propagation, thus the redundant computation is eliminated. (2) Unified thread mapping for fusion. We propose a unified thread mapping scheme for both vertex- and edge-centric operators to enable fusion and reduce IO. (3) Intermediate data recomputation. Intermediate data are recomputed during the backward pass to reduce the total memory consumption. Extensive experimental results on three typical GNN models show that, we achieve up to 2.75x end-to-end speedup, 6.89x less memory IO, and 7.73x less memory consumption over state-of-the-art frameworks.

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

↑