Abstract
Graph Neural Networks (GNNs) have garnered a lot of recent interest because of their success in learning representations from graph-structured data across several critical applications in cloud and HPC. Owing to their unique compute and memory characteristics that come from an interplay between dense and sparse phases of computations, the emergence of reconfigurable dataflow (aka spatial) accelerators offers promise for acceleration by mapping optimized dataflows (i.e., computation order and parallelism) for both phases. The goal of this work is to characterize and understand the design-space of dataflow choices for running GNNs on spatial accelerators in order for the compilers to optimize the dataflow based on the workload. Specifically, we propose a taxonomy to describe all possible choices for mapping the dense and sparse phases of GNNs spatially and temporally over a spatial accelerator, capturing both the intra-phase dataflow and the inter-phase (pipelined) dataflow. Using this taxonomy, we do deep-dives into the cost and benefits of several dataflows and perform case studies on implications of hardware parameters for dataflows and value of flexibility to support pipelined execution.
The GNN Challenge: Sparse vs. Dense Phases
Graph Neural Networks (GNNs) are notoriously difficult to accelerate because they consist of two fundamentally different phases that must work in tandem. The first is Aggregation, a sparse-matrix computation (SpMM) characterized by irregular data access patterns. The second is Combination, a dense-matrix computation (GEMM) similar to traditional deep learning layers.
While spatial accelerators—arrays of processing elements (PEs) like those found in the TPU or Cerebras—offer high performance, most research has focused on optimizing single-phase dense layers. Existing GNN hardware often utilizes fixed ASICs hard-coded for specific dataflows, failing to account for the massive diversity in graph structures, such as the difference between a social network and a molecular graph. This work addresses the lack of a formal framework to describe and optimize how these two phases should be mapped spatially and temporally onto flexible hardware.
Methodology: A Formal Taxonomy
To navigate this complex design space, we developed a formal taxonomy to describe GNN dataflows across three dimensions:
- Intra-phase Dataflow: Defines how loops (Vertices, Features, Neighbors) are ordered and whether they are mapped spatially (across PEs) or temporally (over time).
- Inter-phase Strategy: Defines how data moves between phases. We identify three types: Sequential (Seq), Sequential Pipeline (SP) (interleaving small stages on the same PEs), and Parallel Pipeline (PP) (splitting the PE array to run both phases simultaneously).
- Granularity: Determines whether the pipeline moves data at the element, row, or column level.
We evaluated these strategies using a cycle-accurate simulation framework built around the STONNE simulator, modeling flexible architectures like MAERI and SIGMA. Our analytical model calculated runtime, energy, and buffering requirements for over 6,000 possible dataflow combinations across various GNN benchmarks (e.g., Collab, Reddit-bin, Mutag).
Key Insights and Results
Our analysis revealed several critical takeaways for GNN accelerator design:
- The Interdependence Trap: The dataflow choice for the sparse phase dictates the efficiency of the dense phase. For instance, if Aggregation produces data row-by-row, the Combination phase must consume it in that exact order to avoid massive on-chip buffering requirements.
- Pipelining for Energy Efficiency: The primary benefit of pipelining (SP and PP) is energy reduction. By keeping intermediate data in local PE registers or small buffers, these dataflows avoid the "energy tax" of writing massive intermediate matrices back to DRAM.
- The "Evil Row" Problem: In high-feature (HF) datasets, a single node with many neighbors (a "dense" row in a sparse matrix) can become a bottleneck, stalling an entire parallel pipeline.
- Hardware Constraints: We found that low distribution or reduction bandwidth in the hardware can completely negate the benefits of certain "spatial-heavy" dataflows, emphasizing the need for balanced architecture design.
Conclusion
No single dataflow is optimal for all graph types. For high-feature datasets, Parallel Pipelining often performs best, while Sequential Pipelining is the winner for most other cases. This study demonstrates that a "rigid" fixed-function ASIC might perform 10x worse than a flexible architecture when graph structures change. The next step in this research is building automated compilers that can dynamically select the best dataflow from this taxonomy for a specific graph and hardware target.
Summary updated