arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.06979cs.DCcs.LG
收藏

Tensor Core上的高效量化稀疏矩阵运算

Efficient Quantized Sparse Matrix Operations on Tensor Cores

Beijing University of Posts and Telecommunications(北京邮电大学);ETH Zurich(苏黎世联邦理工学院)

Shigang Li, Kazuki Osawa, Torsten Hoefler

AI总结:

针对Tensor Core上稀疏低精度矩阵运算难获实际加速的问题,提出支持混合精度稀疏运算的Magicube库,在A100上相比厂商库和现有最优方案均取得显著加速。

摘要:

模型规模的指数级增长推动着深度学习的持续成功,但也带来了难以承受的计算与内存成本。从算法角度,研究者已开展模型稀疏化与量化研究以缓解该问题;从架构角度,硬件厂商提供了Tensor Core(张量核心)用于加速。然而,由于Tensor Core对数据布局有严格要求,且缺乏对低精度整数高效操作的支持,要在其上通过稀疏低精度矩阵运算获得实际加速极具挑战。我们提出Magicube,这是一款面向Tensor Core上低精度整数的高性能稀疏矩阵库,支持深度学习中两类主要的混合精度稀疏运算:SpMM(稀疏矩阵-稠密矩阵乘法)和SDDMM(采样稠密-稠密矩阵乘法)。在NVIDIA A100 GPU上的实验结果表明,针对稀疏核,Magicube相比厂商优化库平均实现1.44倍(最高2.37倍)的加速;针对端到端稀疏Transformer推理,在精度相当的情况下,其速度相比当前最优方案提升1.43倍。

英文摘要:

The exponentially growing model size drives the continued success of deep learning, but it brings prohibitive computation and memory cost. From the algorithm perspective, model sparsification and quantization have been studied to alleviate the problem. From the architecture perspective, hardware vendors provide Tensor cores for acceleration. However, it is very challenging to gain practical speedups from sparse, low-precision matrix operations on Tensor cores, because of the strict requirements for data layout and lack of support for efficiently manipulating the low-precision integers. We propose Magicube, a high-performance sparse-matrix library for low-precision integers on Tensor cores. Magicube supports SpMM and SDDMM, two major sparse operations in deep learning with mixed precision. Experimental results on an NVIDIA A100 GPU show that Magicube achieves on average 1.44x (up to 2.37x) speedup over the vendor-optimized library for sparse kernels, and 1.43x speedup over the state-of-the-art with a comparable accuracy for end-to-end sparse Transformer inference.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑