jackwish commented on a change in pull request #4714: Mxnet parser for Qnn 
dialect
URL: https://github.com/apache/incubator-tvm/pull/4714#discussion_r368292387
 
 

 ##########
 File path: python/tvm/relay/frontend/mxnet.py
 ##########
 @@ -1075,6 +1097,378 @@ def _mx_cond(inputs, attrs, subgraphs):
     return ret
 
 
+def _qnn_quantize(inputs, attrs):
+    out_dtype = 'int8'
+    out_type = attrs.get_str('out_type')
+    if out_type == 'auto':
+        if attrs.has_attr('min_calib_range') and 
attrs.has_attr('max_calib_range'):
+            if attrs.get_float('min_calib_range') >= 0:
+                out_dtype = 'uint8'
+            else:
+                out_dtype = 'int8'
+    else:
+        out_dtype = out_type
+    if out_dtype not in {'int8', 'uint8'}:
 
 Review comment:
   It seems that this assert checks `out_type` actually? If that is the case, 
can we move it to where we obtained the `out_type` value?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to