Submitted:
26 November 2026
Posted:
27 November 2026
You are already at the latest version
Abstract
Cluster-wise SpGEMM improves locality by grouping rows of \( A \) with similar sparsity patterns, but the grouping must be paid for before it can be amortised, and the number of multiplications that takes varies by orders of magnitude between matrices. We find the cost reported for this preprocessing is dominated by artifacts of the implementation: removing them, with the clustering verified bit-identical by hash, moves the median break-even point from 89 to 51 multiplications on one host and from 53 to 42 on another. Can that point be predicted before it is paid? A predictor must be charged for its own features, which costs an order of magnitude until the probe is written natively. Charged honestly, the answer depends on how the benchmark is weighted: counting matrices equally, a model fitted without locality features matches the full one; weighted by time, those features cut aggregate regret from 8.3% to 2.5%, because a model that cannot rank speedups clusters two graphs that clustering slows down. That gain rests on a few large matrices and varies with the fit. The locality features are not there to improve the typical decision; they are there to prevent a few expensive ones.
Keywords:
sparse matrix–matrix multiplication
; SpGEMM
; data locality
; row clustering
; preprocessing amortisation
; performance prediction
; MinHash
; locality-sensitive hashing
; benchmarking methodology
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.