Accelerating Generic Graph Neural Networks via Architecture, Compiler, Partition Method Co-Design

Shuwen Lu, Zhihui Zhang, Cong Guo, Jingwen Leng, Yangjie Zhou, Minyi GuoarXiv 2023 · DOI

Graph Neural Networks (GNNs) have emerged as powerful tools for processing non-Euclidean data, with applications spanning drug discovery, recommendation systems, and social network analysis. However, accelerating GNNs presents a unique "double whammy" of challenges: extreme bandwidth requirements due to irregular graph traversals and a vast diversity of model architectures (e.g., GCN, GAT, GraphSAGE). Existing accelerators often trade off flexibility for performance, or vice versa.

To address these bottlenecks, researchers from Shanghai Jiao Tong University introduced SWITCHBLADE, a full-stack co-design framework that integrates a specialized compiler, an optimized graph partitioner, and a custom hardware accelerator.

The SWITCHBLADE Framework

The SWITCHBLADE system adopts a holistic approach to GNN acceleration by coordinating software and hardware layers to overcome the high bandwidth and model diversity bottlenecks.

Overview of the SWITCHBLADE full-stack GNN acceleration framework.

As shown in Figure 1, the framework consists of three primary components:

  1. GNN Compiler: Maps high-level GNN models into a unified three-phase program template.
  2. Graph Partitioner: Implements Fine-Grained Graph Partitioning (FGGP) to optimize data locality.
  3. GNN Accelerator: A custom hardware architecture designed to execute fused operators using multi-threading.

Core Methodologies

Partition-Level Operator Fusion (PLOF)

Traditional GNN execution suffers from high DRAM traffic because operators are processed sequentially. SWITCHBLADE introduces Partition-Level Operator Fusion (PLOF), which decomposes GNN models into a generic Scatter-Gather-Apply template. By fusing these operations at the shard level, the system keeps intermediate data on-chip, accessing main memory only at phase boundaries. This significantly reduces off-chip bandwidth requirements.

Shard-Level Multi-Threading (SLMT)

To maximize hardware utilization, SWITCHBLADE employs Shard-Level Multi-Threading (SLMT). GNN phases utilize different hardware resources; for instance, the Gather phase may be compute-heavy (matrix math), while Scatter is memory-intensive.

Timeline of Shard-Level Multi-Threading (SLMT) showing concurrent execution of memory and compute instructions across threads.

As illustrated in Figure 6, SLMT allows the accelerator to process multiple graph shards concurrently. While one thread (sThread) performs dense matrix multiplications, another can handle vector-based aggregations or memory transfers. This overlapping of execution phases effectively hides latency and eliminates "bubbles" in hardware utilization where specific functional units would otherwise sit idle.

Fine-Grained Graph Partitioning (FGGP)

Efficient multi-threading requires high-quality graph partitions. FGGP generates dense shards by skipping unused source vertices within intervals. This ensures that the data packed into on-chip memory is highly relevant, reducing the memory footprint and improving the efficiency of the SLMT mechanism without exploding on-chip memory requirements.

Evaluation and Results

The framework was evaluated against an NVIDIA V100 GPU and specialized accelerators like HyGCN across five diverse datasets (e.g., citation networks, social networks) and four GNN models (GCN, GAT, GraphSAGE, GG-NN).

  • Performance: SWITCHBLADE achieved an average 1.85× speedup over the V100 GPU. Even against HyGCN—an accelerator hand-tuned specifically for GCNs—SWITCHBLADE was 1.28× faster on GCN workloads while maintaining the flexibility to run other models.
  • Energy Efficiency: The co-design approach resulted in a massive 19.03× reduction in energy consumption compared to the GPU, primarily due to the drastic reduction in off-chip data movement enabled by PLOF.
  • Hardware Utilization: Evaluation showed that using three concurrent "shard-threads" (sThreads) provided the optimal balance between resource utilization and memory contention.

Conclusion

SWITCHBLADE demonstrates that the key to efficient GNN acceleration lies in a unified abstraction that bridges the gap between diverse model architectures and irregular graph data. By combining partition-level fusion with shard-level multi-threading, the framework overcomes the "bandwidth wall" and provides a generic, high-performance solution for the next generation of graph-based deep learning. Future work will focus on scaling this architecture to multi-chip systems for billion-node graph processing.

Summary updated

Abstract

Graph neural networks (GNNs) have shown significant accuracy improvements in a variety of graph learning domains, sparking considerable research interest. To translate these accuracy improvements into practical applications, it is essential to develop high-performance and efficient hardware acceleration for GNN models. However, designing GNN accelerators faces two fundamental challenges: the high bandwidth requirement of GNN models and the diversity of GNN models. Previous works have addressed the first challenge by using more expensive memory interfaces to achieve higher bandwidth. For the second challenge, existing works either support specific GNN models or have generic designs with poor hardware utilization. In this work, we tackle both challenges simultaneously. First, we identify a new type of partition-level operator fusion, which we utilize to internally reduce the high bandwidth requirement of GNNs. Next, we introduce partition-level multi-threading to schedule the concurrent processing of graph partitions, utilizing different hardware resources. To further reduce the extra on-chip memory required by multi-threading, we propose fine-grained graph partitioning to generate denser graph partitions. Importantly, these three methods make no assumptions about the targeted GNN models, addressing the challenge of model variety. We implement these methods in a framework called SwitchBlade, consisting of a compiler, a graph partitioner, and a hardware accelerator. Our evaluation demonstrates that SwitchBlade achieves an average speedup of $1.85\times$ and energy savings of $19.03\times$ compared to the NVIDIA V100 GPU. Additionally, SwitchBlade delivers performance comparable to state-of-the-art specialized accelerators.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
GNN workloads (five graph datasets and four GNN models)SwitchBladespeedup1.85×Graph Neural Network Inference · layers=2 identical layers · models=4 GNN models · datasets=5 graph datasets · embedding-dimensions=128 input, hidden, and output
Source quote
L630: On average, SwitchBlade{} achieves a 1.85× speedup over the baseline V100 GPU.
GNN workloads (five graph datasets and four GNN models)SwitchBladeenergy saving19.03×Graph Neural Network Inference · models=4 GNN models · datasets=5 graph datasets · energy-scaling=28nm to 12nm
Source quote
L637: SwitchBlade{} achieves an average 19.03× energy saving over the baseline V100 GPU and 0.82× over HyGCN.
GCN workloadsSwitchBladespeedup1.28×Graph Neural Network Inference
Source quote
L632: Moreover, SwitchBlade{} attains a 1.28× speedup over HyGCN on GCN workloads, which is notable considering HyGCN deploys a hardwired pipeline tailored for GCN.
GCN workloadsSwitchBladeenergy saving0.82×Graph Neural Network Inference · energy-scaling=28nm to 12nm
Source quote
L637: SwitchBlade{} achieves an average 19.03× energy saving over the baseline V100 GPU and 0.82× over HyGCN.
BibTeX
@misc{lu2023accelerating,
  author = {Shuwen Lu and Zhihui Zhang and Cong Guo and Jingwen Leng and Yangjie Zhou and Minyi Guo},
  title = {{Accelerating Generic Graph Neural Networks via Architecture, Compiler, Partition Method Co-Design}},
  year = {2023},
  eprint = {2308.08174},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.08174},
}
Figure