Quantized Convolution error on Mobile with some scale values. #33466
Labels
oncall: mobile
Related to mobile support, including iOS and Android
oncall: quantization
Quantization support in PyTorch
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
QNNPACK throws an error with certain scale values for input and weight tensors. The error happens when the convolution scale is greater than 1.0. convolution scale is computed as
input_scale * kernel_scale / output_scale;
This is a problem which arises when model is trained with QAT and run on QNNPACK mobile backend.
To Reproduce
Script to repro the error
Expected behavior
Output from FBGEMM
Output from QNNPACK
Error in QNNPACK: failed to create convolution with 0.052 input scale, 2.39 kernel scale, and 0.112 output scale: convolution scale 1.109643 is greater or equal to 1.0
cc @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a, @kimishpatel
The text was updated successfully, but these errors were encountered: