You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/12 01:46:23 UTC
[GitHub] [tvm] eleflea opened a new issue #7645: quantized pytorch model convert bug in upsample_nearest2d
eleflea opened a new issue #7645:
URL: https://github.com/apache/tvm/issues/7645
When I convert a QNN with `aten::upsample_nearest2d` op, I encountered a error with:
_File "/home/eleflea/.local/lib/python3.7/site-packages/tvm-0.8.dev704+g3a0e3a5bb-py3.7-linux-x86_64.egg/tvm/relay/frontend/pytorch.py", line 1749, in upsample
assert isinstance(inputs[-2], float)_
After some research I found that for some quantized op, tvm add qparams manually to help convert. But for `aten::upsample_nearest2d`, it seems to be missing.
So I add `aten::upsample_nearest2d` just above `aten::upsample_bilinear2d` at [here](https://github.com/apache/tvm/blob/e9e014b4685ea05885cb321f1e42d2d3f71a0407/python/tvm/relay/frontend/qnn_torch.py#L356). And it works.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi closed issue #7645: quantized pytorch model convert bug in upsample_nearest2d
Posted by GitBox <gi...@apache.org>.
masahi closed issue #7645:
URL: https://github.com/apache/tvm/issues/7645
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi commented on issue #7645: quantized pytorch model convert bug in upsample_nearest2d
Posted by GitBox <gi...@apache.org>.
masahi commented on issue #7645:
URL: https://github.com/apache/tvm/issues/7645#issuecomment-797176693
Yes that sounds correct, can you send a PR?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi commented on issue #7645: quantized pytorch model convert bug in upsample_nearest2d
Posted by GitBox <gi...@apache.org>.
masahi commented on issue #7645:
URL: https://github.com/apache/tvm/issues/7645#issuecomment-797178553
Actually, for nearest we don't need to wrap upsample with dequantize/quantize, we can use the same compute as fp32, since resize nearest just copies values.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org