Description: Performs two small matrix multiplications on the input matrix x: it right-multiplies x by kroneckerP2 and left-multiplies the result by kroneckerP1, then applies per-token quantization to the matrix multiplication result.
Formula:
- Right-multiply x by kroneckerP2:
- Left-multiply x' by kroneckerP1:
- Compute the maximum absolute value along dimension 0 of x'' and divide by (7/clipRatio) to obtain the quantization factor for INT4 quantization:
- Compute the output out:
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, [object Object] is called to perform computation.
[object Object]
[object Object]
Parameters
[object Object]Returns
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- Deterministic computation:
- aclnnFlatQuant defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]