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 2022/11/28 10:28:02 UTC

[GitHub] [tvm] leandron commented on a diff in pull request #13498: [CMSIS-NN] Support int16 handling for pooling functions

leandron commented on code in PR #13498:
URL: https://github.com/apache/tvm/pull/13498#discussion_r1033367237


##########
python/tvm/relay/op/contrib/cmsisnn.py:
##########
@@ -287,8 +287,8 @@ def check_qnn_avg_pool2d(pattern):
         return (
             pooling.attrs.layout == "NHWC"
             and int(input_op.checked_type.shape[0]) == 1
-            and input_op.checked_type.dtype == "int8"
-            and output.checked_type.dtype == "int8"
+            and (input_op.checked_type.dtype == "int8" or input_op.checked_type.dtype == "int16")
+            and (output.checked_type.dtype == "int8" or output.checked_type.dtype == "int16")

Review Comment:
   Minor suggestion: a slightly more pythonic comparison.
   
   ```suggestion
               and (input_op.checked_type.dtype in ("int8", "int16"))
               and (output.checked_type.dtype in ("int8", "int16"))
   ```



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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org