Graph Neural Network (GNN) inference is used in many real-world applications. Data sparsity in GNN inference, including sparsity in the input graph and the GNN model, offer opportunities to further speed up inference. Also, many pruning techniques have been proposed for model compression that increase the data sparsity of GNNs. We propose Dynasparse, a comprehensive hardware-software codesign on FPGA to accelerate GNN inference through dynamic sparsity exploitation. For this, we decouple the GNN computation kernels from the basic computation primitives, and explore hardware-software codesign as follows: 1) Hardware design: We propose a novel unified accelerator design on FPGA to efficiently execute various computation primitives. We develop a customized soft processor that is tightly coupled with the accelerator to execute a runtime system. Moreover, we develop efficient hardware mechanisms to profile the data sparsity and perform on-the-fly data format transformation to prepare the input data for various computation primitives; 2) Software design: We develop a runtime system that works synergistically with the accelerator to perform dynamic kernel-to-primitive mapping based on data sparsity. We implement Dynasparse on a state-of-the-art FPGA platform, Xilinx Alveo U250, and evaluate the design using widely used GNN models (GCN, GraphSAGE, GIN and SGC). For the above GNN models and various input graphs, the proposed accelerator and dynamic kernel-to-primitive mapping reduces the inference latency by $3.73\times$ on the average compared with the static mapping strategies employed in the state-of-the-art GNN accelerators. Compared with state-of-the-art CPU (GPU) implementations, Dynasparse achieves up to $56.9\times$ ($2.37\times$) speedup in end-to-end latency.
翻译:图形神经网络(GNN)推理在许多实际应用中得到了应用。GNN 推理中的数据稀疏性,包括输入图形和 GNN 模型中的稀疏性,提供了进一步加速推理的机会。此外,许多修剪技术已经用于模型压缩,增加了 GNN 的数据稀疏性。我们提出了 Dynasparse,这是一个综合的硬件-软件代码设计,旨在通过动态稀疏性利用加速 GNN 推理。为此,我们将 GNN 计算内核与基本计算基元分离,并进行硬件-软件代码设计,具体如下:1)硬件设计:我们提出了一种新颖的 FPGA 上的统一加速器设计,以有效地执行各种计算基元。我们开发一个定制的软处理器,与加速器紧密耦合,执行运行时系统。此外,我们开发了有效的硬件机制,对数据稀疏性进行概要分析,并执行实时数据格式转换,以为各种计算基元做准备; 2)软件设计:我们开发一个运行时系统,与加速器协同工作,基于数据稀疏性执行动态内核与基元映射。我们在先进的 FPGA 平台 Xilinx Alveo U250 上实施了 Dynasparse,并使用广泛使用的 GNN 模型(GCN、GraphSAGE、GIN 和 SGC)进行了评估。对于上述 GNN 模型和各种输入图形,所提出的加速器和动态内核与基元映射平均减少了推断延迟 $3.73\times$,与现有的 GNN 加速器中采用的静态映射策略相比。与最先进的 CPU (GPU) 实现相比, Dynasparse 在端到端延迟上可实现高达 $56.9\times$ ($2.37\times$) 的加速。