Vai_q_pytorch displays a warning message if an
issue could lead to problems or incompleteness in the quantization result (r to the
message text for details). The message format is [VAIQ_WARN][MESSAGE_ID]:
message text. The quantization process can still proceed to completion
despite the warning.
List important warning messages in the following table:
Message ID | Description |
---|---|
QUANTIZER_TORCH_BATCHNORM_AFFINE | BatchNorm OP attribute affine=False has been replaced by affine=True when parsing the model. |
QUANTIZER_TORCH_BITWIDTH_MISMATCH | Bit width setting in the configuration file. If it conflicts with that from torch_quantizer API, the setting in the configuration file is used. |
QUANTIZER_TORCH_CONVERT_XMODEL | Convert to XMODEL failed. Check the message text to locate the reason. |
QUANTIZER_TORCH_CUDA_UNAVAILABLE | CUDA (HIP) is not available. Change the device to CPU. |
QUANTIZER_TORCH_DATA_PARALLEL | Data parallel is not supported. The wrapper 'torch.nn.DataParallel' has been removed in vai_q_pytorch. |
QUANTIZER_TORCH_DEPLOY_MODEL | Only quantization aware training process has a deployable model. |
QUANTIZER_TORCH_DEVICE_MISMATCH | The input arguments device mismatches with the quantizer device type. |
QUANTIZER_TORCH_EXPORT_XMODEL | Failed to generate XMODEL due to some reasons. Refer to the message text. |
QUANTIZER_TORCH_FINETUNE_IGNORED | Fast fine-tuning function is ignored in test mode. |
QUANTIZER_TORCH_FLOAT_OP | vai_q_pytorch recognizes the list OP as a float operator by default. |
QUANTIZER_TORCH_INSPECTOR_PATTERN | The OP might not be fused by the compiler and is assigned to DPU. |
QUANTIZER_TORCH_LEAKYRELU | Force to change the negative_slope of LeakyReLU to 0.1015625 because DPU only supports this value. It is recommended to change all negative_slope of LeakyReLU to 0.1015625 and re-train the float model for better-deployed model accuracy. |
QUANTIZER_TORCH_MATPLOTLIB | matplotlib is needed for visualization but not found. It needs to be installed. |
QUANTIZER_TORCH_MEMORY_SHORTAGE | There is not enough memory for fast finetune, and this process is ignored. Try to use a smaller calibration dataset. |
QUANTIZER_TORCH_NO_XIR | Cannot find the XIR package in the environment. It needs to be installed. |
QUANTIZER_TORCH_REPLACE_RELU6 | ReLU6 has been replaced by ReLU. |
QUANTIZER_TORCH_REPLACE_SIGMOID | Sigmoid has been replaced by Hardsigmoid. |
QUANTIZER_TORCH_REPLACE_SILU | SiLU has been replaced by Hardswish. |
QUANTIZER_TORCH_SHIFT_CHECK | Quantization scale is too large or too small. |
QUANTIZER_TORCH_TENSOR_NOT_QUANTIZED | Some tensors are not quantized. Check their particularity. |
QUANTIZER_TORCH_TENSOR_TYPE_NOT_QUANTIZABLE | The tensor type of the node cannot be quantized. Only support float32/double/float16 quantization. |
QUANTIZER_TORCH_TENSOR_VALUE_INVALID | The tensor has an "inf" or "nan" value. Quantization for this tensor is ignored. |
QUANTIZER_TORCH_TORCH_VERSION | Only support exporting TorchScript with PyTorch 1.10 and later versions. |
QUANTIZER_TORCH_XIR_MISMATCH | XIR version does not match the current vai_q_pytorch. |
QUANTIZER_TORCH_XMODEL_DEVICE | Not support to dump XMODEL when the target device is not DPU. |
QUANTIZER_TORCH_REUSED_MODULE | Reused module might lead to low accuracy of QAT. Ensure this is what you expect. Refer to the message text to locate the module with the issue. |
QUANTIZER_TORCH_DEPRECATED_ARGUMENT | The argument device is no longer needed. Device information is obtained from the model directly. |
QUANTIZER_TORCH_SCALE_VALUE | Exported scale values are not trained. |