- Description: Performs matrix multiplication on the tensors self and mat2.
- Formula:
Each operator has calls. First, aclnnMmGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnMm is called to perform computation.
[object Object]
[object Object]
Parameters:
[object Object]- [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]:
- The data type BFLOAT16 is not supported.
- cubeMathType=0 is not supported when the input data type is FLOAT32.
- cubeMathType=1: If the input data type is FLOAT32, it is converted to FLOAT16 for computation. If the input data type is not FLOAT32, no processing is performed.
- cubeMathType=3 is not supported.
- cubeMathType=4: No processing is performed.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
- cubeMathType=1: If the input data type is FLOAT32, it is converted to HFLOAT32 for computation. If the input data type is not FLOAT32, no processing is performed.
- cubeMathType=2: If the input data type is BFLOAT16, this option is not supported.
- cubeMathType=3: If the input data type is FLOAT32, it is converted to HFLOAT32 for computation. If the input data type is not FLOAT32, this option is not supported.
- cubeMathType=4: If the input data type is FLOAT32 and the k-axis is greater than 2048, grouped accumulation is used for computation. If the input data type is not FLOAT32 or the k-axis is less than 2048, no processing is performed.
- Ascend 950PR/Ascend 950DT:
- cubeMathType=1: If the input data type is FLOAT32, it is converted to HFLOAT32 for computation. If the input data type is not FLOAT32, no processing is performed.
- cubeMathType=2: If the input data type is BFLOAT16, this option is not supported.
- cubeMathType=3: If the input data type is FLOAT32, it is converted to HFLOAT32 for computation. If the input data type is not FLOAT32, this option is not supported.
- cubeMathType=4: No processing is performed.
- [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]:
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
Deterministic description:
- [object Object]Atlas training products[object Object], [object Object]Atlas inference products[object Object], and Ascend 950PR/Ascend 950DT: The aclnnMm is implemented in a deterministic manner by default.
Computational consistency description
- [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]:
- If enabled, the computation result is deterministic, meaning that multiple executions will generate the same result. In addition, the compute result is irrelevant to the data location.
- aclnnMm defaults to a non-consistent implementation. You can call aclrtCtxSetSysParamOpt to enable consistency compute.
- For example, when performing matrix multiplication, the order of accumulation across different basic blocks may vary, which may lead to slight differences in results for the same data in different rows. However, when strong consistency compute is enabled, the results will remain consistent across rows as long as the inputs are the same.
- [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]:
The following example is for reference only. For details, see .
[object Object]