Skip to main content
QUICK REVIEW

[Paper Review] GE-SpMM: General-purpose Sparse Matrix-Matrix Multiplication on GPUs for Graph Neural Networks

Guyue Huang, Guohao Dai|arXiv (Cornell University)|Jul 7, 2020
Advanced Graph Neural NetworksComputer Science27 references6 citations
TL;DR

GE-SpMM proposes a general-purpose sparse matrix-matrix multiplication (SpMM) kernel for GPUs tailored to Graph Neural Networks (GNNs), using Compressed Sparse Row (CSR) format to eliminate preprocessing overhead. It introduces Coalesced Row Caching and Coarse-grained Warp Merging to optimize memory access and reduce redundant loading, achieving up to 1.41× speedup over cuSPARSE and up to 3.67× end-to-end speedup in GNN frameworks like DGL and PyG.

ABSTRACT

Graph Neural Networks (GNNs) have achieved significant improvements in various domains. Sparse Matrix-Matrix multiplication (SpMM) is a fundamental operator in GNNs, which performs a multiplication between a sparse matrix and a dense matrix. Accelerating SpMM on parallel hardware like GPUs can face the following challenges: From the GNN application perspective, the compatibility needs to be considered. General GNN algorithms require SpMM-like operations (e.g., pooling) between matrices, which are not supported in current high-performance GPU libraries (e.g., Nvidia cuSPARSE). Moreover, the sophisticated preprocessing in previous implementations will lead to heavy data format conversion overheads in GNN frameworks. From the GPU hardware perspective, optimizations in SpMV (Sparse Matrix-Vector) designs on GPUs do not apply well to SpMM. SpMM exposes the column-wise parallelism in the dense output matrix, but straightforward generalization from SpMV leads to inefficient, uncoalesced access to sparse matrix in global memory. The sparse row data can be reused among GPU threads, which is neither possible in SpMM designs inherited from SpMV. To tackle these challenges, we propose GE-SpMM. GE-SpMM performs SpMM-like operation on sparse matrices represented in the most common Compressed Sparse Row (CSR) format, so it can be embedded in GNN frameworks with no preprocessing overheads and support general GNN algorithms. We introduce the Coalesced Row Caching method to process columns in parallel and ensure coalesced access to sparse matrix data. We also present the Coarse-grained Warp Merging to reduce redundant data loading among GPU warps. Experiments on a real-world graph dataset show that GE-SpMM achieves up to 1.41X speedup over Nvidia cuSPARSE and up to 1.81X over GraphBLAST. We also embed GE-SpMM in GNN frameworks and get up to 3.67X speedup over popular GNN models like GCN and GraphSAGE.

Motivation & Objective

  • Address the lack of support for general SpMM-like operations (e.g., pooling) in existing GPU libraries like cuSPARSE, which limits GNN framework performance.
  • Eliminate costly data format conversion overheads in GNN frameworks by natively supporting CSR format, enabling seamless integration without preprocessing.
  • Overcome inefficient memory access patterns in GPU SpMM by exploiting column-wise parallelism and reducing redundant data loading across warps.
  • Enable high-performance acceleration of diverse GNN models, including those using non-standard reduction operations like max pooling, which are not natively supported by vendor libraries.

Proposed method

  • Design a CSR-native SpMM kernel that directly consumes sparse matrices in CSR format, avoiding costly preprocessing and format conversion in GNN pipelines.
  • Introduce Coalesced Row Caching to process matrix columns in parallel and ensure coalesced memory access patterns, improving global memory bandwidth utilization.
  • Implement Coarse-grained Warp Merging to reduce redundant data loading by reusing sparse row data across GPU warps, minimizing redundant memory fetches.
  • Optimize thread and memory access patterns to exploit both row-wise reuse and column-wise parallelism, adapting GPU architecture characteristics for SpMM workloads.
  • Support general SpMM-like operations (e.g., max pooling) by abstracting the reduction operation, enabling flexible integration into diverse GNN models.
  • Embed the kernel into popular GNN frameworks (DGL and PyG) to evaluate real-world performance gains in end-to-end training workloads.

Experimental results

Research questions

  • RQ1Can a general-purpose SpMM kernel be designed to support both standard SpMM and SpMM-like operations (e.g., max pooling) without requiring preprocessing or format conversion?
  • RQ2How can GPU memory access patterns be optimized in SpMM to achieve coalesced access and reduce redundant data loading across warps?
  • RQ3To what extent can a CSR-native SpMM kernel outperform existing high-performance libraries like cuSPARSE and GraphBLAST in GNN workloads?
  • RQ4What performance gains can be achieved by integrating the SpMM kernel into real GNN frameworks like DGL and PyG across diverse model architectures and datasets?

Key findings

  • GE-SpMM achieves up to 1.41× speedup over Nvidia cuSPARSE and up to 1.81× speedup over GraphBLAST on real-world graph datasets.
  • The Coalesced Row Caching technique alone provides up to 1.25× speedup by enabling efficient, coalesced memory access during column-wise processing.
  • The Coarse-grained Warp Merging technique contributes up to 1.51× speedup by reducing redundant data loading across GPU warps.
  • In end-to-end GNN training, GE-SpMM delivers up to 3.67× reduction in CUDA time when integrated into DGL, and up to 2.10× reduction in PyG, depending on model configuration.
  • For SpMM-like operations such as max pooling in GraphSAGE-pool, GE-SpMM achieves up to 6.15× speedup over DGL’s native implementation on the Pubmed graph.
  • The kernel is effective across different GPUs (GTX 1080Ti and RTX 2080), with consistent performance gains across varying feature vector lengths and model depths.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.