GUST: Graph Edge-Coloring Utilization for Accelerating Sparse Matrix Vector Multiplication

Armin Gerami, Bahar Asgari · DOI · OpenReview

TL;DR

This paper introduces GUST, a novel hardware-software co-design for accelerating Sparse Matrix-Vector Multiplication (SpMV). By separating multipliers and adders and employing an edge-coloring scheduling algorithm, GUST significantly improves hardware utilization and achieves substantial speedups and energy efficiency gains compared to existing methods, even on highly sparse matrices.

What Problem Does This Paper Address?

Sparse Matrix-Vector Multiplication (SpMV) is a fundamental operation in many scientific and engineering domains, from computational physics to machine learning. However, traditional processors struggle to achieve peak performance with sparse data due to the overhead of processing numerous zero elements. While specialized hardware accelerators have been developed, they often face challenges in fully utilizing their resources because of the inherent sparsity of the matrices. This leads to poor hardware utilization and limits overall performance. The core problem is how to design an SpMV accelerator that can efficiently handle sparse data and maximize the use of its computational resources.

Methods

GUST tackles the SpMV acceleration problem through a hardware-software co-design approach. The key hardware innovation is the separation of multipliers and adders, connected by a reconfigurable crossbar connector. This allows for resource sharing across multiple rows and columns, leading to more efficient hardware utilization.

The crucial software component is a novel scheduling algorithm based on bipartite-graph edge-coloring. This algorithm addresses the "collisions" that can arise from resource sharing. By modeling the SpMV problem as a bipartite graph where edges represent matrix elements, and colors represent scheduled positions in input buffers, the algorithm ensures that no two elements from the same row or column are processed simultaneously in a way that would cause a stall. This edge-coloring ensures efficient data flow to the multipliers and adders.

Additionally, GUST incorporates a simple sort-based load balancing mechanism to further improve performance by reducing inconsistencies in the number of non-zero elements across different parts of the matrix.

Datasets

The authors evaluated GUST using a combination of:

  • Synthetic matrices: Including uniform, power-law, and k-regular distributions with dimensions of 16,384 and densities ranging from 1e-4 to 5e-2.
  • Real-world matrices: A collection from the SuiteSparse and SNAP matrix collections, with densities ranging from 1e-5 to 1e-1.

Key Insights and Ideas

  • Separating multipliers and adders is key to resource sharing: By decoupling these units and using a crossbar, GUST can dynamically route partial products to adders, enabling efficient reuse of hardware across different matrix rows and columns.
  • Edge-coloring is a powerful combinatorial tool for scheduling: Applying bipartite-graph edge-coloring to the SpMV problem effectively resolves resource contention (collisions) that would otherwise cripple performance, especially with sparse data.
  • Hardware utilization is directly tied to scheduling: The paper strongly emphasizes that the hardware architecture alone is insufficient; a sophisticated scheduling algorithm is critical to unlock the potential of resource sharing and achieve high hardware utilization.
  • GUST's performance is density-independent: Unlike many other approaches, GUST's effectiveness is not significantly degraded by matrix density, making it robust across a wide range of sparse matrices.

Key Results

  • High Hardware Utilization: GUST achieved an average hardware utilization of 33.67% on real-world sparse matrices, which is notably high for sparse computations.
  • Significant Speedup and Energy Efficiency: Compared to a baseline 1D systolic array, length-256 GUST achieved an average speedup of 411x and an energy efficiency improvement of 137x. Length-87 GUST showed even better energy efficiency gains (148x) with considerably less hardware.
  • Competitive with State-of-the-Art: When compared to Serpens, a state-of-the-art FPGA-based SpMV accelerator, GUST achieved lower execution time for seven out of nine matrices and lower energy consumption for four.
  • Effectiveness of Scheduling: The results clearly demonstrate that GUST with Edge-Coloring and load balancing (EC/LB) significantly outperforms naive scheduling and other prior designs in both hardware utilization and execution time.

Limitations and Future Work

  • Crossbar Overhead: The paper acknowledges that the crossbar connector introduces a considerable overhead, particularly for larger GUST lengths. This overhead scales quadratically with GUST's length.
  • Scalability through Parallelism: To mitigate the crossbar overhead for very large GUST lengths, the authors suggest a parallel arrangement of multiple smaller GUST instances rather than a single large one. This approach would still benefit from resource sharing within each smaller GUST.
  • 2D GUST for SpMM: The authors propose investigating the possibility of extending GUST's resource sharing concept to a 2D architecture for accelerating Sparse Matrix-Matrix Multiplication (SpMM).
  • Generalizing Edge-Coloring: The edge-coloring concept could potentially be extended to other applications that involve shared resources and require collision avoidance.
  • GPU Implementation: The paper notes that GUST's principles are applicable to other hardware platforms, including GPUs, where shared memory can act as a crossbar. However, further investigation is needed to address GPU-specific memory-bound challenges.

Summary updated

BibTeX
@inproceedings{gerami2024gust,
  author = {Armin Gerami and Bahar Asgari},
  title = {{GUST: Graph Edge-Coloring Utilization for Accelerating Sparse Matrix Vector Multiplication}},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3622781.3674186},
}
Figure