How the Dirty Set Moves: Characterizing Schedule Reuse in Incremental Sparse Matrix Multiplication
Hunter Horne, Eric Spencer, Alex Henningfield, Arslan Bisharat
Abstract
Sparse matrices, in which most entries are zero, are central to scientific simulation, graph analytics and machine learning, and their multiplication with dense inputs is a core parallel kernel. In many applications the matrix stays fixed while only a few input rows change per step, so the result can be updated from those rows alone, which we call the dirty set. Sparse kernels often add a second optimization based on the inspector-executor principle, in which a tiled schedule is prepared once and reused across calls. However, when this reuse remains profitable as the dirty set moves is not well characterized. In this paper, we show that retained tiled execution rarely beats direct CSC in incremental sparse matrix multiplication, although incremental execution itself remains highly profitable. Across 21 SuiteSparse matrices and controlled patterns of motion, a direct column-wise incremental update is 2.1-8.2x faster than the best of eight full-recomputation codes, among them Intel oneMKL and PyTorch. Yet the same direct update outperforms a tiled executor that retains tile preparation and caches assembled schedules in 779 of 837 workloads. Separating reuse into per-tile preparation and cached schedules shows that the benefit comes from preparation; extra cache capacity seldom helps because a tile set rarely returns after a different one has intervened. Tiling is faster only when tiles merge many entries into each output write, a structural property that we predicted before measurement and confirmed on four held-out matrices of the same family. These results show that the structure of the matrix and the motion of the dirty set, rather than the sophistication of the schedule, determine whether reuse is profitable. We anticipate that our methodology and guidelines will help developers decide when to build schedule reuse into incremental sparse runtimes.
Create a lesson
Related papers
PrismStencil: Transforming Stencil Computations into Matrix Multiplications
Xianmeng Jiang, Yuan Liang, Zixuan Wang et al.
Fast and Flexible Spiking Network Simulations on Massively Distributed On-Chip Memory Accelerators
Catherine Mia Schöfmann, Jan Finkbeiner, Jan Vogelsang et al.
How Reliable Are Large Language Models for Soil Organic Carbon Assessment? An Australian Benchmark
Yingxuan Cheng, Tong Li, Yayong Li et al.
AlignPred: Error-Controlled KV Cache Compression via Alignment and Predictive Coding
Xu Yang, Jiapeng Zhang, Zhiwei Zuo et al.
DynaSPLIT: Strong tail-optimal scheduling for the M/G/n with heavy-tailed job sizes
Zhouzi Li, Mor Harchol-Balter, Alan Scheller-Wolf
Compositional Performance Modeling of LLM Inference Clusters with Hierarchical KV Caching
Ruiyang Ma, Sheng Qi, DaiKang Kuang et al.