- Description: Performs group-wise quantization on the input x.
- Formula:
Each operator has calls. First, aclnnGroupQuantGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnGroupQuant 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]
- The data type of the input
[object Object]is the same as that of the input[object Object]. - If the
[object Object]attribute is set to 29 (INT4), the last dimension of the input[object Object]shape must be divisible by 2. - If the
[object Object]attribute is set to 3 (INT32), the last dimension of the input[object Object]shape must be divisible by 8, and the last axis of the input[object Object]shape must be eight times that of the output[object Object]shape. - The input
[object Object]must be a non-decreasing sequence. The minimum value cannot be less than 0, and the maximum value must be equal to the size of the 0th dimension of the input[object Object]shape. If the constraint is not met, the[object Object]parameter is not verified. - The size of the 0th dimension of the input
[object Object]cannot be 0. - Currently, the shape of the input
[object Object]can only be [1, ] or [ , ]. - Deterministic computation:
- aclnnGroupQuant defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]