MultiCoreMatmulGetTmpBufSize

Function Usage

Obtains the used L1/UB/L0C size based on the tiling structure information after multi-core tiling.

Prototype

1
int32_t MultiCoreMatmulGetTmpBufSize(optiling::TCubeTiling & tiling, matmul_tiling::SysTilingTempBufSize &bufSize)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

tiling

Input

Multi-core Matmul tiling structure.

bufSize

Output

Used L1/UB/L0C size obtained based on the tiling structure information. The SysTilingTempBufSize structure is defined as follows:

1
2
3
4
5
struct SysTilingTempBufSize {
    int32_t ubSize = 0;
    int32_t l1Size = 0;
    int32_t l0cSize = 0;
};

Returns

-1: setting failed; 0: setting succeeded.

Precautions

None

Example

1
2
3
4
5
optiling::TCubeTiling tilingData; 
...Initialize tilingData. For details, see section "Matmul Tiling".

SysTilingTempBufSize bufSize;
MultiCoreMatmulGetTmpBufSize(tilingData, bufSize);