MultiCoreMatmulGetTmpBufSizeV2
Function Usage
Obtains the used L1/UB/L0C size based on the tiling structure information after multi-core tiling.
Prototype
1 | int32_t MultiCoreMatmulGetTmpBufSizeV2(TCubeTiling & tiling, matmul_tiling::SysTilingTempBufSize &bufSize) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
tiling |
Input |
Multi-core Matmul tiling structure. TCubeTiling is the Matmul TilingData defined on the kernel. It is used together with the GetTiling API whose input parameter is the TCubeTiling structure without the optiling namespace. |
||
bufSize |
Output |
Used L1/UB/L0C size obtained based on the tiling structure information. The SysTilingTempBufSize structure is defined as follows:
|
Returns
-1: setting failed; 0: setting succeeded.
Precautions
None
Example
1 2 3 4 5 6 7 8 9 | auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo()); matmul_tiling::MultiCoreMatmulTiling tiling(ascendcPlatform); tiling.SetDim(1); ... TCubeTiling tilingData; int ret = tiling.GetTiling(tilingData); //: Obtains tiling parameters. ... SysTilingTempBufSize bufSize; MultiCoreMatmulGetTmpBufSizeV2(tilingData, bufSize); |
Parent topic: Obtaining Space Required for Matmul Computation