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 2020/03/02 18:25:25 UTC

[GitHub] [incubator-tvm] anijain2305 commented on a change in pull request #4977: [Torch, QNN] Add support for quantized models via QNN

anijain2305 commented on a change in pull request #4977: [Torch, QNN] Add support for quantized models via QNN
URL: https://github.com/apache/incubator-tvm/pull/4977#discussion_r386563528
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -146,6 +149,10 @@ def _impl(inputs, input_types):
 def _relu():
     def _impl(inputs, input_types):
         data = inputs[0]
+        if input_types[0] == "quint8":
+            assert len(inputs) == 3, "Input quant param not found in op inputs"
+            input_zero_point = _expr.const(inputs[2])
 
 Review comment:
   Do you want to add a datatype "int32" here?

----------------------------------------------------------------
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


With regards,
Apache Git Services