Function deepviewrt_sys::nn_tensor_quantization_type
source · pub unsafe extern "C" fn nn_tensor_quantization_type(
tensor: *mut NNTensor
) -> NNQuantizationTypeExpand description
Returns the quantization type for the tensor.
@note This API was missing before version 2.4.32 and instead the quantization format is inferred as affine when scales and zeros are provided and per-tensor vs. per-channel is inferred based on scales/zeros being 1 or greater than 1.
@param tensor the tensor object used to query quantization type.
@returns @ref NNQuantizationType_None for tensors which do not provide quantization parameters. @returns @ref NNQuantizationType_Affine_PerTensor for tensors which provide quantization parameters which map globally to the tensor. @returns @ref NNQuantizationType_Affine_PerChannel for tensors which provide quantization parameters which map to each channel “C” of the tensor. @returns @ref NNQuantizationType_DFP for tensors which provide DFP parameters. Currently unsupported.
@public @memberof NNTensor @since 2.4.32