A Context-Awareness and Hardware-Friendly Sparse Matrix Multiplication Kernel for CNN Inference Acceleration

被引:0
作者
Wang, Haotian [1 ,2 ]
Ding, Yan [3 ,4 ]
Liu, Yumeng [5 ]
Liu, Weichen [6 ]
Liu, Chubo [1 ,2 ]
Yang, Wangdong [1 ,2 ]
Li, Kenli [1 ,2 ]
机构
[1] Hunan Univ, Coll Informat Sci & Engn, Changsha 410082, Peoples R China
[2] Natl Supercomp Ctr Changsha, Changsha 410082, Peoples R China
[3] Hunan Univ, Coll Comp Sci & Elect Engn, Changsha 410082, Peoples R China
[4] Xiangjiang Lab, Changsha 410205, Peoples R China
[5] Chinese Acad Sci, Inst Software, Beijing 100190, Peoples R China
[6] Nanyang Technol Univ, Coll Comp Sci & Engn, Singapore 639798, Singapore
基金
国家重点研发计划; 中国国家自然科学基金; 中国博士后科学基金;
关键词
Sparse matrices; Computational modeling; Tensors; Kernel; Accuracy; Graphics processing units; Convolutional neural networks; Hardware; Convolution; Adaptation models; 2:4 sparsity; CNNs; filter pruning; sparse matrix multiplication; sparse tensor cores;
D O I
10.1109/TC.2024.3517745
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Sparsification technology is crucial for deploying convolutional neural networks in resource-constrained environments. However, the efficiency of sparse models is hampered by irregular memory access patterns in sparse matrix multiplication kernels. Hardware-level support for 2:4 granularity in sparse tensor cores presents an opportunity for designing efficient sparse matrix multiplication kernels. Existing approaches often involve adjusting sparse structures or secondary sparsification, introducing additional computational errors. To tackle this challenge, we introduce a flexible 2:4 structured adaptive sparse matrix multiplication (FS-AMM) method, a hardware-friendly sparse matrix multiplication kernel that leverages model context to accelerate convolutional neural networks. First, we propose a model context-aware matrix pre-processing method that employs heuristic algorithms to estimate a loss of accuracy due to weight sparsity at each layer. Second, we design a hardware-friendly sparse storage format that combines 2:4 sparse and dense storage formats, enabling more versatile sparsity ratio selection. Third, we implement efficient matrix multiplication kernels to optimize GPU utilization. Finally, experimental results on A100 GPUs show that our method effectively utilizes the sparse tensor kernel and obtains an average 3.09 times speedup ratio compared to other sparse methods while maintaining a high accuracy.
引用
收藏
页码:1182 / 1195
页数:14
相关论文
共 40 条
[1]   KBLAS: An Optimized Library for Dense Matrix-Vector Multiplication on GPU Accelerators [J].
Abdelfattah, Ahmad ;
Keyes, David ;
Ltaief, Hatem .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2016, 42 (03)
[2]  
Akiva-Hochman R., 2022, Lecture Notes in Computer Science, P130
[3]   EdgeFireSmoke: A Novel Lightweight CNN Model for Real-Time Video Fire-Smoke Detection [J].
Almeida, Jefferson Silva ;
Huang, Chenxi ;
Nogueira, Fabricio Gonzalez ;
Bhatia, Surbhi ;
de Albuquerque, Victor Hugo C. .
IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, 2022, 18 (11) :7889-7898
[4]   VENOM: A Vectorized N:M Format for Unleashing the Power of Sparse Tensor Cores [J].
Castro, Roberto L. ;
Ivanov, Andrei ;
Andrade, Diego ;
Ben-Nun, Tal ;
Fraguela, Basilio B. ;
Hoefler, Torsten .
SC23:INTERNATIONAL CONFERENCE FOR HIGH PERFORMANCE COMPUTING, NETWORKING, STORAGE AND ANALYSIS, 2023,
[5]   Probing the Efficacy of Hardware-Aware Weight Pruning to Optimize the SpMM routine on Ampere GPUs [J].
Castro, Roberto L. ;
Andrade, Diego ;
Fraguela, Basilio B. .
PROCEEDINGS OF THE 2022 31ST INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES, PACT 2022, 2022, :135-147
[6]  
Chen A.-T., 2021, P 9 INT S COMP NETW, P1
[7]   Cyclic CNN: Image Classification With Multiscale and Multilocation Contexts [J].
Chen, Xin ;
Xie, Lingxi ;
Wu, Jun ;
Tian, Qi .
IEEE INTERNET OF THINGS JOURNAL, 2021, 8 (09) :7466-7475
[8]   DSSA: Dual-Side Sparse Systolic Array Architecture for Accelerating Convolutional Neural Network Training [J].
Chen, Zhengbo ;
Yu, Qi ;
Zheng, Fang ;
Guo, Feng ;
Chen, Zuoning .
51ST INTERNATIONAL CONFERENCE ON PARALLEL PROCESSING, ICPP 2022, 2022,
[9]  
Chetlur S, 2014, Arxiv, DOI arXiv:1410.0759
[10]  
Chitty-Venkata K. T., 2022, P 31 INT S HIGH PERF