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

iSpLib:一个使用自动调优稀疏操作加速图神经网络的库

iSpLib: A Library for Accelerating Graph Neural Networks using Auto-tuned Sparse Operations

Indiana University Bloomington(印第安纳大学伯明顿分校)

Md Saidul Hoque Anik, Pranav Badhe, Rohit Gampa, Ariful Azad

AI总结:

提出基于PyTorch的C++库iSpLib,通过自动调优稀疏操作和启用缓存的反向传播加速GNN训练,仅需两行代码即可集成,在CPU上实现高达27倍训练加速。

摘要:

图神经网络(GNN)训练和推理中的核心计算通常被映射为稀疏矩阵操作,例如稀疏-稠密矩阵乘法(SpMM)。这些稀疏操作难以通过手动调优来优化,因为其性能显著依赖于输入图的稀疏性、GNN模型和计算平台。为了解决这一挑战,我们提出了iSpLib,一个基于PyTorch的C++库,配备了自动调优的稀疏操作。iSpLib通过启用缓存的反向传播来加速GNN训练,该传播将中间矩阵存储在本地缓存中。该库提供了一个用户友好的Python插件,允许用户开箱即用地利用我们优化的PyTorch操作,用于流行GNN(如图卷积网络、GraphSAGE、图推理网络等)的任何现有的基于线性代数的PyTorch实现,只需两行额外代码。我们证明,与CPU上等效的PyTorch 2.1.0和PyTorch Geometric 2.4.0实现相比,iSpLib获得了高达27倍的总体训练加速。我们的库已在https://github.com/HipGraph/iSpLib公开发布。

英文摘要:

Core computations in Graph Neural Network (GNN) training and inference are often mapped to sparse matrix operations such as sparse-dense matrix multiplication (SpMM). These sparse operations are harder to optimize by manual tuning because their performance depends significantly on the sparsity of input graphs, GNN models, and computing platforms. To address this challenge, we present iSpLib, a PyTorch-based C++ library equipped with auto-tuned sparse operations. iSpLib expedites GNN training with a cache-enabled backpropagation that stores intermediate matrices in local caches. The library offers a user-friendly Python plug-in that allows users to take advantage of our optimized PyTorch operations out-of-the-box for any existing linear algebra-based PyTorch implementation of popular GNNs (Graph Convolution Network, GraphSAGE, Graph Inference Network, etc.) with only two lines of additional code. We demonstrate that iSpLib obtains up to 27x overall training speedup compared to the equivalent PyTorch 2.1.0 and PyTorch Geometric 2.4.0 implementations on the CPU. Our library is publicly available at https://github.com/HipGraph/iSpLib (https://doi.org/10.5281/zenodo.10806511).

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

↑