Function: Fake-quantizes the input data self on the specified axis using scale and zero_point, updates the value range of the fake-quantized output based on quant_min and quant_max, and returns the result out and the corresponding position mask.
Formula: Computes the temporary variable qval, then calculates out and mask.
- The data type of zero_point is int32.
- The data type of zero_point is float16 or float32.
Each operator has calls. First, aclnnFakeQuantPerChannelAffineCachemaskGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnFakeQuantPerChannelAffineCachemask is called to perform computation.
Parameters
[object Object]Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
Deterministic computation:
- aclnnFakeQuantPerChannelAffineCachemask defaults to a deterministic implementation.
The current operator FakeQuantPerChannelAffineCachemask does not yet support FLOAT32 or FLOAT16 inputs for zero_point. This constraint is currently enforced at the aclnn API level and will be lifted once the operator natively supports these data types.
The following example is for reference only. For details, see .