You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
An error is encountered in the ONNX Runtime quantization code, specifically in _adjust_weight_scale_for_int32_bias:
File "/home/.pyenv/versions/dev/lib/python3.10/site-packages/onnxruntime/quantization/qdq_quantizer.py", line 478, in _adjust_weight_scale_for_int32_bias
if (bias_candidate_scale < bias_smallest_valid_scale) and (bias_candidate_scale > 0.0):
Notably, the model must be preprocessed with onnxsim.simplify before quantization, as this introduces the GEMM op, which triggered the error. If the quantization config option QDQDisableWeightAdjustForInt32Bias is enabled, the error disappears. It seems likely there is an issue with handling singleton dimension bias during weight scale adjustment.
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue
An error is encountered in the ONNX Runtime quantization code, specifically in
_adjust_weight_scale_for_int32_bias
:This occurs when quantizing the MNIST model from ONNX model zoo:
https://github.com/onnx/models/blob/bec48b6a70e5e9042c0badbaafefe4454e072d08/validated/vision/classification/mnist/model/mnist-12.onnx
Notably, the model must be preprocessed with
onnxsim.simplify
before quantization, as this introduces the GEMM op, which triggered the error. If the quantization config optionQDQDisableWeightAdjustForInt32Bias
is enabled, the error disappears. It seems likely there is an issue with handling singleton dimension bias during weight scale adjustment.To reproduce
Model:
https://github.com/onnx/models/blob/bec48b6a70e5e9042c0badbaafefe4454e072d08/validated/vision/classification/mnist/model/mnist-12.onnx
Source code for reproduction:
System information
The text was updated successfully, but these errors were encountered: