SetScaleAType
Function Usage
Sets the position, data format, and transpose status of matrix scaleA in the MxMatmul scenario. These settings must be consistent with those in the kernel. If this API is not called, the settings of matrix scaleA will be kept the same as that of matrix A in SetAType.
Prototype
1
|
int32_t SetScaleAType(TPosition scalePos, CubeFormat scaleType, bool isScaleTrans = false) |
Parameters
Returns
-1: setting failed; 0: setting succeeded.
Restrictions
None
Example
1 2 3 4 5 |
auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo()); matmul_tiling::MatmulApiTiling tiling(ascendcPlatform); tiling.SetAType(matmul_tiling::TPosition::GM, matmul_tiling::CubeFormat::ND, matmul_tiling::DataType::DT_FLOAT16); // Set matrix scaleA, with the buffer located in the GM, data format of ND, and transpose disabled. tiling.SetScaleAType(matmul_tiling::TPosition::GM, matmul_tiling::CubeFormat::ND, false); |
Parent topic: Matmul Tiling