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 (2.2 MB)
Collect
Submit Manuscript AI Chat Paper
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Publishing Language: Chinese

Optimization Strategies for Matrix-Vector Multiplication Based on Ascend NPU

Lu LU( ), Zhongshu GU
School of Computer Science and Engineering, South China University of Technology, Guangzhou 510006, Guangdong, China
Show Author Information

Abstract

General Matrix-Vector Multiplication (GEMV) is a core operation in the decoding phase of large language models, and its performance directly determines the inference efficiency of the models. However, existing Neural Processing Units (NPUs) mostly implement GEMV operations by invoking General Matrix Multiplication (GEMM) interfaces, which suffer from poor adaptability and low hardware resource utilization in small-scale dimension scenarios. This paper conducts research on hardware adaptation and performance optimization of GEMV operators based on the Ascend 910 B NPU. By leveraging the hardware features of the Ascend 910 B AI Core compute kernels, this paper designs fundamental GEMV implementation schemes adapted to the corresponding compute units, respectively based on the matrix operation unit (AIC) and the vector operation unit (AIV). To meet the hardware data layout requirements of AIC, this paper equivalently transforms the GEMV operation into matrix-transposevector multiplication to improve result write-back efficiency. To address the memory access characteristics of the AIV, differentiated computation flows are designed according to different data layouts to ensure the continuity of memory access and compute instructions. On this basis, this paper further proposes general optimization strategies: adopting a rectangular tiling mechanism to maintain memory access continuity and reduce instruction dispatch overhead, and employing secondary task partitioning to alleviate computational load imbalance. Additionally, this paper designs an operator fusion interface that supports the fusion of GEMV with elementwise operators, with performance overhead kept within 2% when fusion computation is completed on the AIV unit. Experimental results show that under three data precision scenarios—single-precision floating-point, half-precision floating-point, and 8-bit integer, the performance of the GEMV implemented and optimized in this study reaches 3.38 times, 2.94 times, and 23.95 times (including dequantization) that of the default GEMM interface of the Ascend CANN platform, respectively. This provides strong support for efficient deployment and inference of large models on NPU platforms.

CLC number: TP302.1 Article ID: 1000-565X(2026)08-0001-13

References

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

{{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, GU Z. Optimization Strategies for Matrix-Vector Multiplication Based on Ascend NPU. Journal of South China University of Technology (Natural Science Edition), 2026, 54(8): 1-13. https://doi.org/10.12141/j.issn.1000-565X.250406

2

Views

0

Downloads

0

Crossref

0

Web of Science

0

Scopus

0

CSCD

Received: 27 October 2025
Published: 01 August 2026
© Journal of South China University of Technology (Natural Science Edition)