Closed eleflea closed 3 years ago
@anijain2305 Is group conv supported by QNN? The following line that does multiplication seems incorrect for group conv case. Here, the weight shape is (24, 3, 3, 3), and multiplying 24 * 3 results in the error message above because weight scale shape is (24,). https://github.com/apache/tvm/blob/813136401a11a49d6c15e6013c34dd822a5c4ff6/src/relay/qnn/op/convolution.cc#L81
@eleflea For now you can do per tensor quantization to workaround this problem (the error happens if you use per channel weight quantization by get_default_qconfig('fbgemm')
). You can force per tensor Q by get_default_qconfig('qnnpack')
for example.
Thanks for asking the question, the community uses for trouble shooting and discussions, please bring a new discussion topic on https://discuss.tvm.apache.org/, where more people will be able to watch and answer the questions.
Hi I find a bug of relay. I used pytorch to quantize a grouped convolution model, and an error was reported in
relay.frontend.from_pytorch
function. Detailed as follows.It raise:
But when
GROUPS = 1
, it works, so i think it is related to quantized group conv2d. Looking forward to your reply! Thank you.