- Description: Quantizes the input x. The sizes of scale and offset must be equal to the last dimension of x or equal to 1.
- Formula:
When sqrtMode is false, the calculation formula is as follows:
When sqrtMode is true, the calculation formula is as follows:
Each operator has calls. First, aclnnAscendQuantGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnAscendQuant is called to perform computation.
[object Object]
[object Object]
Parameters:
[object Object]- [object Object]Atlas inference series products[object Object]:
- Data type:
- The input parameters
[object Object],[object Object], and[object Object]do not support BFLOAT16. - The output parameter
[object Object]supports only INT8.
- The input parameters
- The input parameter
[object Object]can only be set to 2, indicating INT8.
- Data type:
- [object Object]Atlas inference series products[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 compute:
- aclnnAscendQuant defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]