一句话:提出窗口自适应数据流、可重构硬件与剖析引导选择,使 SpGEMM 加速器泛化适配多种稀疏模式。
稀疏矩阵乘法(SpGEMM)广泛用于科学与深度学习,但其高度不规则的稀疏结构使传统平台效率受限,催生了许多专用加速器。现有 SpGEMM 加速器通常只支持内积、外积或行式等固定执行数据流,每种仅对特定稀疏模式优化,难以在跨领域多样的 SpGEMM 负载上保持稳健性能。本文提出 Spada,结合三项技术:窗口式自适应数据流,可灵活切换模式以匹配数据分布并获得不同复用收益;支持快速、低成本重构与有效负载均衡的硬件架构;以及基于邻近矩阵区域稀疏模式相似性的剖析引导方法,用于检测稀疏模式并选择优化数据流。评估表明,Spada 能匹配或超过三种最先进 SpGEMM 加速器中的最优者,并在数据分布与数据流不匹配时避免其他方案的性能退化,在广泛稀疏矩阵和压缩神经网络模型上平均取得 1.44 倍加速。
Sparse matrix-matrix multiplication (SpGEMM) is widely used in many scientific and deep learning applications. The highly irregular structures of SpGEMM limit its performance and efficiency on conventional computation platforms, and thus motivate a large body of specialized hardware designs. Existing SpGEMM accelerators only support specific types of rigid execution dataflow such as inner/output-product or row-based schemes. Each dataflow is only optimized for certain sparse patterns and fails to generalize with robust performance to the widely diverse SpGEMM workloads across various domains. We propose Spada, a combination of three novel techniques for SpGEMM accelerators to efficiently adapt to various sparse patterns. First, we describe a window-based adaptive dataflow that can be flexibly adapted to different modes to best match the data distributions and realize different reuse benefits. Then, our hardware architecture efficiently supports this dataflow template, with flexible, fast, and low-cost reconfigurability and effective load balancing features. Finally, we use a profiling-guided approach to detect the sparse pattern and determine the optimized dataflow mode to use, based on the key observations of sparse pattern similarity in nearby matrix regions. Our evaluation results demonstrate that Spada is able to match or exceed the best among three state-of-the-art SpGEMM accelerators, and avoid the performance degradation of the others if data distribution and dataflow mismatch. It achieves an average 1.44× speedup across a wide range of sparse matrices and compressed neural network models.
@inproceedings{paperbot10008,
title = {Spada: Accelerating Sparse Matrix Multiplication with Adaptive Dataflow},
author = {Zhiyao Li and Jiaxiang Li and Taijie Chen and Dimin Niu and Hongzhong Zheng and Yuan Xie and Mingyu Gao},
booktitle = {ASPLOS},
year = {2023},
doi = {10.1145/3575693.3575706}
}