一句话:提出 DTC-SpMM,通过压缩格式、重排序与运行时流水线优化,在张量核上高效加速通用 SpMM。
稀疏矩阵-矩阵乘法(SpMM)是科学计算与机器学习中的基础操作。尽管张量核(Tensor Cores)为加速 SpMM 带来机遇,但将其用于通用 SpMM 仍面临性能瓶颈。本文系统分析当前基于张量核的 SpMM 加速技术,识别关键性能差距,并提出 DTC-SpMM。该方法包含高效的稀疏数据压缩格式、重排序方法以及运行时流水线优化,以适配通用稀疏模式并充分利用张量核。在现代 GPU 上使用多种基准矩阵的实验表明,SpMM 加速性能显著提升;案例研究显示,DTC-SpMM 相比流行 GNN 框架可将端到端 GNN 训练加速最高 1.91 倍。
Sparse Matrix-Matrix Multiplication (SpMM) is a building-block operation in scientific computing and machine learning applications. Recent advancements in hardware, notably Tensor Cores (TCs), have created promising opportunities for accelerating SpMM. However, harnessing these hardware accelerators to speed up general SpMM necessitates considerable effort. In this paper, we undertake a comprehensive analysis of the state-of-the-art techniques for accelerating TC-based SpMM and identify crucial performance gaps. Drawing upon these insights, we propose DTC-SpMM, a novel approach with systematic optimizations tailored for accelerating general SpMM on TCs. DTC-SpMM encapsulates diverse aspects, including efficient compression formats, reordering methods, and runtime pipeline optimizations. Our extensive experiments on modern GPUs with a diverse range of benchmark matrices demonstrate remarkable performance improvements in SpMM acceleration by TCs in conjunction with our proposed optimizations. The case study also shows that DTC-SpMM speeds up end-to-end GNN training by up to 1.91× against popular GNN frameworks.