SSpMM: Efficiently Scalable SpMM Kernels Across Multiple Generations of Tensor Cores

IF 6 2区 计算机科学 Q1 COMPUTER SCIENCE, THEORY & METHODS
Zeyu Xue;Mei Wen;Jianchao Yang;Minjin Tang;Zhongdi Luo;Jing Feng;Yang Shi;Zhaoyun Chen;Junzhong Shen;Johannes Langguth
{"title":"SSpMM: Efficiently Scalable SpMM Kernels Across Multiple Generations of Tensor Cores","authors":"Zeyu Xue;Mei Wen;Jianchao Yang;Minjin Tang;Zhongdi Luo;Jing Feng;Yang Shi;Zhaoyun Chen;Junzhong Shen;Johannes Langguth","doi":"10.1109/TPDS.2025.3616981","DOIUrl":null,"url":null,"abstract":"Sparse-Dense Matrix-Matrix Multiplication (SpMM) has emerged as a foundational primitive in HPC and AI. Recent advancements have aimed to accelerate SpMM by harnessing the powerful Tensor Cores found in modern GPUs. However, despite these efforts, existing methods frequently encounter performance degradation when ported across different Tensor Core architectures. Recognizing that scalable SpMM across multiple generations of Tensor Cores relies on the effective use of general-purpose instructions, we have meticulously developed a SpMM library named <italic>SSpMM</i>. However, a significant conflict exists between granularity and performance in current Tensor Core instructions. To resolve this, we introduce the innovative <italic>Transpose Mapping Scheme</i>, which elegantly implements fine-grained kernels using coarse-grained instructions. Additionally, we propose the <italic>Register Shuffle Method</i> to further enhance performance. Finally, we introduce <italic>Sparse Vector Compression</i>, a technique that ensures our kernels are scalable with both structured and unstructured sparsity. Our experimental results, conducted on four generations of Tensor Core GPUs using over 3,000 sparse matrices from well-established matrix collections, demonstrate that <italic>SSpMM</i> achieves an average speedup of 2.04 ×, 2.81 ×, 2.07 ×, and 1.87 ×, respectively, over the state-of-the-art SpMM solution. Furthermore, we have integrated <italic>SSpMM</i> into PyTorch, achieving a 1.81 × speedup in end-to-end Transformer inference compared to <italic>cuDNN</i>.","PeriodicalId":13257,"journal":{"name":"IEEE Transactions on Parallel and Distributed Systems","volume":"36 12","pages":"2652-2667"},"PeriodicalIF":6.0000,"publicationDate":"2025-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Parallel and Distributed Systems","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11189050/","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

Sparse-Dense Matrix-Matrix Multiplication (SpMM) has emerged as a foundational primitive in HPC and AI. Recent advancements have aimed to accelerate SpMM by harnessing the powerful Tensor Cores found in modern GPUs. However, despite these efforts, existing methods frequently encounter performance degradation when ported across different Tensor Core architectures. Recognizing that scalable SpMM across multiple generations of Tensor Cores relies on the effective use of general-purpose instructions, we have meticulously developed a SpMM library named SSpMM. However, a significant conflict exists between granularity and performance in current Tensor Core instructions. To resolve this, we introduce the innovative Transpose Mapping Scheme, which elegantly implements fine-grained kernels using coarse-grained instructions. Additionally, we propose the Register Shuffle Method to further enhance performance. Finally, we introduce Sparse Vector Compression, a technique that ensures our kernels are scalable with both structured and unstructured sparsity. Our experimental results, conducted on four generations of Tensor Core GPUs using over 3,000 sparse matrices from well-established matrix collections, demonstrate that SSpMM achieves an average speedup of 2.04 ×, 2.81 ×, 2.07 ×, and 1.87 ×, respectively, over the state-of-the-art SpMM solution. Furthermore, we have integrated SSpMM into PyTorch, achieving a 1.81 × speedup in end-to-end Transformer inference compared to cuDNN.
SSpMM:跨多代张量核的有效可扩展的SpMM内核
稀疏-密集矩阵-矩阵乘法(SpMM)已经成为高性能计算和人工智能的基础基元。最近的进展旨在通过利用现代gpu中发现的强大张量核心来加速SpMM。然而,尽管做出了这些努力,现有的方法在跨不同的Tensor Core架构移植时经常会遇到性能下降。认识到跨多代张量核心的可扩展SpMM依赖于通用指令的有效使用,我们精心开发了一个名为SSpMM的SpMM库。然而,在当前的Tensor Core指令中,粒度和性能之间存在着显著的冲突。为了解决这个问题,我们引入了创新的转置映射方案,该方案使用粗粒度指令优雅地实现了细粒度内核。此外,我们提出了寄存器Shuffle方法来进一步提高性能。最后,我们介绍了稀疏向量压缩,这是一种确保我们的内核在结构化和非结构化稀疏性下都可扩展的技术。我们在四代Tensor Core gpu上进行的实验结果表明,与最先进的SpMM解决方案相比,SSpMM的平均加速分别为2.04 x、2.81 x、2.07 x和1.87 x。此外,我们将SSpMM集成到PyTorch中,与cuDNN相比,在端到端Transformer推理方面实现了1.81倍的加速。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Parallel and Distributed Systems
IEEE Transactions on Parallel and Distributed Systems 工程技术-工程:电子与电气
CiteScore
11.00
自引率
9.40%
发文量
281
审稿时长
5.6 months
期刊介绍: IEEE Transactions on Parallel and Distributed Systems (TPDS) is published monthly. It publishes a range of papers, comments on previously published papers, and survey articles that deal with the parallel and distributed systems research areas of current importance to our readers. Particular areas of interest include, but are not limited to: a) Parallel and distributed algorithms, focusing on topics such as: models of computation; numerical, combinatorial, and data-intensive parallel algorithms, scalability of algorithms and data structures for parallel and distributed systems, communication and synchronization protocols, network algorithms, scheduling, and load balancing. b) Applications of parallel and distributed computing, including computational and data-enabled science and engineering, big data applications, parallel crowd sourcing, large-scale social network analysis, management of big data, cloud and grid computing, scientific and biomedical applications, mobile computing, and cyber-physical systems. c) Parallel and distributed architectures, including architectures for instruction-level and thread-level parallelism; design, analysis, implementation, fault resilience and performance measurements of multiple-processor systems; multicore processors, heterogeneous many-core systems; petascale and exascale systems designs; novel big data architectures; special purpose architectures, including graphics processors, signal processors, network processors, media accelerators, and other special purpose processors and accelerators; impact of technology on architecture; network and interconnect architectures; parallel I/O and storage systems; architecture of the memory hierarchy; power-efficient and green computing architectures; dependable architectures; and performance modeling and evaluation. d) Parallel and distributed software, including parallel and multicore programming languages and compilers, runtime systems, operating systems, Internet computing and web services, resource management including green computing, middleware for grids, clouds, and data centers, libraries, performance modeling and evaluation, parallel programming paradigms, and programming environments and tools.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信