AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
PDF (1.3 MB)
Collect
Submit Manuscript AI Chat Paper
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Publishing Language: Chinese

Design and Optimization of Small-Batch Matrix Multiplication Based on Matrix Core

Lu LU1( )Rong ZHAO1Zhihong LIANG2Siliang SUO2
School of Computer Science and Engineering, South China University of Technology, Guangzhou 510006, Guangdong, China
CSG Electric Power Research Institute/ Guangdong Provincial Key Laboratory of Power System Network Security, Guangzhou 510623, Guangdong, China
Show Author Information

Abstract

General Matrix Multiplication (GEMM) is one of the most important operations in linear algebra, serving as the backbone for numerous applications in machine learning, scientific computing, and signal processing. In particular, FP16 batch GEMM has become a core operation in deep learning frameworks due to its efficiency in training and inference. However, current implementations on AMD GPUs (e.g., CDNA/MI200 architectures with Matrix Cores) suffer from suboptimal memory access and low compute utilization, limiting performance in high-throughput scenarios. Therefore, this paper proposed a GPU optimization scheme for half-precision batch GEMM (HGEMM). In terms of blocking strategy, it allocates equal memory access and computational loads to threads based on input matrix sizes, while enabling each thread to compute multiple matrix multiplications to improve arithmetic unit utilization. For memory access optimization, it trades redundant data reads for uniform memory access patterns per thread to facilitate compiler optimization, ensuring overlapping of memory and computation time. For extremely small-batch HGEMM with matrix dimensions smaller than 16, the proposed method employs a 4 × 4 × 4 Matrix Core and its corresponding tiling scheme to enhance memory performance while reducing computational resource wastage, and provides the option of whether to use shared memory to achieve the highest performance. This paper compares the performance of this scheme with two operators of rocBLAS on the AMD GPU MI210 platform. The results show that the average performance of this scheme on AMD GPU MI210 is 4.14 times that of rocBLASHGEMMBatched and 4.96 times that of rocBLASGEMMExBatched. For extremely small-batch HGEMM, the average performance is 18.60 times that of rocBLASHGEMMBatched and 14.02 times that of rocBLASGEMMExBatched.

CLC number: TP302.1 Article ID: 1000-565X(2025)09-0048-11

References

【1】
【1】
 
 
Journal of South China University of Technology (Natural Science Edition)
Pages 48-58

{{item.num}}

Comments on this article

Go to comment

< Back to all reports

Review Status: {{reviewData.commendedNum}} Commended , {{reviewData.revisionRequiredNum}} Revision Required , {{reviewData.notCommendedNum}} Not Commended Under Peer Review

Review Comment

Close
Close
Cite this article:
LU L, ZHAO R, LIANG Z, et al. Design and Optimization of Small-Batch Matrix Multiplication Based on Matrix Core. Journal of South China University of Technology (Natural Science Edition), 2025, 53(9): 48-58. https://doi.org/10.12141/j.issn.1000-565X.240498

141

Views

1

Downloads

0

Crossref

0

Web of Science

0

Scopus

0

CSCD

Received: 09 October 2024
Published: 25 September 2025
© Journal of South China University of Technology (Natural Science Edition)