Matmul Feature Scenarios

In addition to the basic computing capabilities of Matmul described above, you also need to master the basic knowledge and operator implementation of Matmul. In addition, Matmul matrix programming provides processing capabilities and multiple functions applicable to different scenarios. The following table lists the specific scenarios and key APIs or parameters used. For details, see the corresponding sections.

Table 2 Matmul features

Category

Feature Description

Key API or Parameter

Function implementation

Quantization and Dequantization of Matrix Multiplication Outputs

SetDequantType, SetQuantScalar, and SetQuantVector

4:2 Sparse Matrix Multiplication

SetSparse and SetSparseIndex

Table 3 BatchMatmul feature

Category

Feature Description

Involved API

Function implementation

Basic Functions of Batch Matmul

BatchMatmul in the NORMAL format: IterateBatch and SetBatchInfoForNormal

BatchMatmul in the BSNGD, SBNGD and BNGS1S2 formats: IterateBatch, SetALayout, SetBLayout, SetCLayout, and SetBatchNum

Batch Matmul Reusing Bias Matrix

GetMMConfig, IterateBatch, and SetBatchInfoForNormal