π€ AI Summary
This work addresses the issue of local memory overflow in GPU-based sparse general matrix-matrix multiplication (SpGEMM) caused by βheavy rowsββrows with an excessive number of nonzeros. To mitigate this, the authors propose an input- and system-aware intra-row reordering strategy that hierarchically partitions heavy rows into independent blocks via multi-way splitting. By integrating this partitioning with outer-product-based computation, partial sums are accumulated entirely within local memory, thereby avoiding costly spilling to global memory. The method automatically determines the optimal number of blocks and hierarchy depth to balance memory efficiency and parallelism. Evaluated on Intel Ponte Vecchio and NVIDIA H200 GPUs, the approach achieves a geometric mean speedup of 1.81β7.62Γ over state-of-the-art libraries such as MKL and cuSPARSE, with core kernels operating near theoretical peak performance.
π Abstract
We present $g$MAGNUS, a novel algorithm for sparse matrix-matrix multiplication (SpGEMM) of irregular matrices on GPUs. Such matrices often contain many \emph{heavy rows}, those with large intermediate products that force local memory accumulators to spill to global memory. $g$MAGNUS addresses this by computing an intra-row reordering of intermediate products, subdividing heavy rows into independent chunks that can be accumulated completely in local memory. This reordering uses novel outer product and hierarchical multisplit operations. The algorithm is input- and system-aware, automatically determining the number of chunks and multisplit levels based on the input matrix dimensions and local memory size. Experimental results on two extensive datasets show that $g$MAGNUS achieves a geometric-mean speedup of 1.81 to 7.62$\times$ over five leading algorithms (including MKL and cuSPARSE) on Intel Ponte Vecchio and NVIDIA H200. Additionally, the core kernels of $g$MAGNUS are evaluated, achieving near-peak performance compared to their theoretical upper bound.