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/05/08 08:02:49 UTC

[GitHub] [tvm] huochaitiantang removed a comment on pull request #7937: [ONNX] Collect quant params of pre-quantized ONNX and generate qnn op

huochaitiantang removed a comment on pull request #7937:
URL: https://github.com/apache/tvm/pull/7937#issuecomment-835189968


   Hi, @mbrookhart @jwfromm Thanks for your advice.
   
   We have tried to export a real pre-quantized ONNX model from popular frameworks. But it seems difficult.
   
    - The pytorch fails to export quantized model to ONNX because of the error: `AttributeError: 'torch.dtype' object has no attribute 'detach'`. Please see https://discuss.pytorch.org/t/onnx-export-failed-int8-model/59754/17
    - The pre-quantized ONNX model exported by tflite is weird, which is not the real quantized model.
    - The pre-quantized ONNX model by onnxruntime looks good, it contains QuantizeLinear -> QLinearConv -> DequantizeLinear, so we submit a new PR to support the QLinearConv: https://github.com/apache/tvm/pull/8007.
   
   The pattern QuantizeLinear -> Conv -> DequantizeLinear may not appear in pre-quantized ONNX models exported by pytorch, tflite, or onnxruntime. So we can close this 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