Taming Multi-Dimensional Skew in Sparse Matrix Multiplication with Contention-Aware Scheduling [Technical Report]
Wentao Huang, Qiming Huang, Yunhong Ji, Mian Lu, Yuqiang Chen, Bingsheng He, Kian-Lee Tan
Abstract
Sparse general matrix-matrix multiplication (SpGEMM) is a key kernel in graph analytics, relational queries, and machine learning. Yet, its performance remains a significant challenge, due to the inherent sparsity and, more critically, the prevalent skew patterns often found in real-world workloads. This paper investigates this problem and demonstrates that an unbalanced workload distribution is the main culprit, harming performance through two co-existing root causes: first, multi-dimensional skew, where imbalance across computation cost, output density, and data locality cannot be captured by any single balancing metric; and second, cache contention, where dense substructures induce severe on-chip interference. To that end, we propose adaptive morsel scheduling (AMS), a dynamic scheduling framework that decouples skew dimensions via fixed-result-size morsels and integrates contention-aware load balancing (CALB) and data-conscious simultaneous multithreading activator (SMTact) to alleviate cache-level contention, alongside a hybrid accumulation mechanism (HYB) that adaptively selects the best accumulator per morsel. Evaluations across matrix squaring, relational queries, graph analytics, and other sparse matrix kernels show that AMS significantly outperforms state-of-the-art methods on skewed workloads while maintaining comparable performance on non-skewed ones. These gains, along with improved bandwidth utilization, remain valid across a wide range of workloads and hardware systems.
Create a lesson
Related papers
Contention-Aware Flexible Execution for Machine Learning Workloads
Shared title terminology · Marco Kurzynski, Shaizeen Aga, Di Wu
Sparse Matrix Multiplication Exponent 1.5 in the Low-bandwidth Model
Shared title terminology · Chetan Gupta, Jukka Suomela, Hossein Vahidi
Ascend-SpMM: Accelerating Sparse Matrix-Dense Matrix Multiplication on Ascend NPUs
Shared title terminology · Jiahe Wang, Yingxia Shao, Shuhan Wang et al.
BitPCE: Batched Multi-Dimensional PolicyResolution with GPU Bitmap Algebra
Shared title terminology · Shengwei Wang
Locality-Aware Scheduling for Stream Processing Applications in Serverless Environments
Shared title terminology · Tianyu Qi, Maria A. Rodriguez, Rajkumar Buyya
BPU-SpikeMM:Exact Matrix Multiplication via Spatio-Temporal Spike Encoding on Real Neuromorphic Hardware
Shared title terminology · Rongyuan Guo, Yufeng Zhang, Haotian Wang et al.