GetSpecialBasicConfig
Function Usage
Configures the parameters to obtain the custom SpecialBasicBlock template. This API is reserved.
Prototype
1 | __aicore__ constexpr MatmulConfig GetSpecialBasicConfig(const uint32_t basicM, const uint32_t basicN, const uint32_t basicK, const uint32_t singleCoreM, const uint32_t singleCoreN, const uint32_t singleCoreK, const uint32_t stepM, const uint32_t stepN, const bool intrinsicsLimit = false, const bool batchLoop = false, const BatchMode bmmMode = BatchMode::BATCH_LESS_THAN_L1) |
Parameters
All parameters of this API are used to set the parameters of the MatmulConfig structure. Parameters corresponding to each other have the same functions.
Parameter |
Input/Output |
Description |
|---|---|---|
basicM |
Input |
Sets the basicM parameter. Equivalent to baseM. Length of the M axis of a base block during Matmul computation. The unit is element. |
basicN |
Input |
Sets the basicN parameter. Equivalent to baseN. Length of the N axis of a base block during Matmul computation. The unit is element. |
basicK |
Input |
Sets the basicK parameter. Equivalent to baseK. Length of the K axis of a base block during Matmul computation. The unit is element. |
singleCoreM |
Input |
Sets the singleCoreM parameter. Shape size of a single core on the M axis, in elements. |
singleCoreN |
Input |
Sets the singleCoreN parameter. Shape size of a single core on the N axis, in elements. |
singleCoreK |
Input |
Sets the singleCoreK parameter. Shape size of a single core on the K axis, in elements. |
stepM |
Input |
Sets the stepM parameter. A multiple of baseM of the left matrix in the bufferM direction buffered in A1. |
stepN |
Input |
Sets the stepN parameter. A multiple of baseN of the right matrix in the bufferN direction buffered in B1. |
intrinsicsLimit |
Input |
Sets the intrinsicsCheck parameter. Whether to enable cyclic data move-in when the inner axis (last axis) of the left or right matrix on a single core is greater than or equal to 65535. For example, for the left matrix A [M, K], if singleCoreK of the inner axis on a single core is greater than 65535 and this parameter is set to true, data is moved in cyclically in the API. Values:
|
batchLoop |
Input |
Sets the isNBatch parameter. Whether to enable multi-batch input and output. This parameter is valid only for BatchMatmul. Values:
|
bmmMode |
Input |
Sets the batchMode parameter. Relationship between the total amount of multi-batch data for input matrices A and B in a BatchMatmul operation and the size of L1 Buffer when the layout mode is set to NORMAL. Values:
|
Returns
Precautions
None