The application relates to the field of high-
performance computing and computing
power optimization, and relates to a method for accelerating
triangular matrix multiplication based on an atlas 800 platform, which comprises the following steps:
cutting a result matrix into multiple task blocks, and presetting an equal division strategy based on the multiple task blocks; generating a
mask matrix on a vector calculation unit, and storing the
mask matrix back to a global memory; reading the matrix and the
mask matrix from the global memory, implementing triangular masking of the matrix by using the vector calculation unit, and obtaining a
triangular matrix A after triangular masking; based on the
triangular matrix A after triangular masking, calling a cube calculation unit to complete
matrix multiplication operation of all the task blocks according to the preset equal division strategy, and obtaining a result matrix. The mix method combining the vector calculation unit and the cube calculation unit is used to complete the triangular
matrix multiplication, the calculation efficiency of the triangular
matrix multiplication on the NPU is improved, the computing power of the Huawei atlas 800 NPU can be fully utilized, the triangular matrix multiplication calculation is accelerated, and computing power support is provided for the fields of
deep learning and scientific calculation.