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

PyTorch-Direct:为具有不规则访问的超大型图神经网络训练启用以GPU为中心的数据访问

PyTorch-Direct: Enabling GPU Centric Data Access for Very Large Graph Neural Network Training with Irregular Accesses

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);IBM T.J. Watson Research Center(IBM托马斯·J·沃森研究中心);NVIDIA(英伟达)

Seung Won Min, Kun Wu, Sitao Huang, Mert Hidayetoğlu, Jinjun Xiong, Eiman Ebrahimi, Deming Chen, Wen-mei Hwu

摘要:

随着机器学习社区越来越多地采用图神经网络(GNN),GPU已成为加速GNN训练的重要工具。然而,在不适合GPU内存的非常大的图上训练GNN仍然是一项具有挑战性的任务。与传统的神经网络不同,GNN中的小样本输入样本需要执行复杂的任务,例如遍历相邻节点并收集其特征值。虽然这个过程占了训练时间的很大一部分,但我们发现使用流行的深度神经网络(DNN)库(如PyTorch)的现有GNN实现仅限于整个数据准备步骤的以CPU为中心的方法。这种“全CPU”方法对整体GNN训练性能有负面影响,因为它过度利用CPU资源并阻碍了GNN训练的GPU加速。为了克服这些限制,我们引入了PyTorch-Direct,它为GNN训练提供了以GPU为中心的数据访问范式。在PyTorch-Direct中,GPU能够直接有效地访问主机内存中的复杂数据结构,而无需CPU干预。我们的微基准测试和端到端GNN训练结果表明,PyTorch-Direct平均将数据传输时间减少了47.1%,并将GNN训练速度提高了1.6倍。此外,通过降低CPU利用率,PyTorch-Direct还在训练期间节省了12.4%至17.5%的系统功耗。为了最大限度地减少程序员的工作量,我们引入了一个新的“统一张量”类型,并对PyTorch内存分配器、分派逻辑和放置规则进行了必要的更改。因此,用户需要为每个张量对象更改最多两行PyTorch GNN训练代码,以利用PyTorch-Direct。

英文摘要:

With the increasing adoption of graph neural networks (GNNs) in the machine learning community, GPUs have become an essential tool to accelerate GNN training. However, training GNNs on very large graphs that do not fit in GPU memory is still a challenging task. Unlike conventional neural networks, mini-batching input samples in GNNs requires complicated tasks such as traversing neighboring nodes and gathering their feature values. While this process accounts for a significant portion of the training time, we find existing GNN implementations using popular deep neural network (DNN) libraries such as PyTorch are limited to a CPU-centric approach for the entire data preparation step. This "all-in-CPU" approach has negative impact on the overall GNN training performance as it over-utilizes CPU resources and hinders GPU acceleration of GNN training. To overcome such limitations, we introduce PyTorch-Direct, which enables a GPU-centric data accessing paradigm for GNN training. In PyTorch-Direct, GPUs are capable of efficiently accessing complicated data structures in host memory directly without CPU intervention. Our microbenchmark and end-to-end GNN training results show that PyTorch-Direct reduces data transfer time by 47.1% on average and speeds up GNN training by up to 1.6x. Furthermore, by reducing CPU utilization, PyTorch-Direct also saves system power by 12.4% to 17.5% during training. To minimize programmer effort, we introduce a new "unified tensor" type along with necessary changes to the PyTorch memory allocator, dispatch logic, and placement rules. As a result, users need to change at most two lines of their PyTorch GNN training code for each tensor object to take advantage of PyTorch-Direct.

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

↑