Basics

This section describes how to use high-level APIs to perform matrix multiplication. In cube programming, check the product models supported by the high-level APIs in API Reference.

Overview of Matrix Multiplication

Matmul formula: C = A × B + bias.

Figure 1 Matmul matrix multiplication

Matrix Multiplication Data Flow

Before learning about the matrix multiplication data flow, you need to review several important concepts of logical storage locations.

Matrix multiplication data flow refers to the flow direction of the input and output of the matrix multiplication between storage locations. The following figure shows the data flow of logical locations. (To simplify the description, bias is not listed.)

Data Format

Two fractal formats, that is, ND and NZ, are mainly involved in completing Matmul. For details about other data formats, see the data layout formats.

Data Tiling