ashutosh-arm commented on code in PR #12353:
URL: https://github.com/apache/tvm/pull/12353#discussion_r951486012


##########
python/tvm/relay/op/contrib/cmsisnn.py:
##########
@@ -136,15 +145,72 @@ def check_qnn_conv2d(pattern):
         ):
             is_depthwise = True
 
-        return (
+        ret = (
+            conv2d.attrs.out_dtype == "int32"
+            and conv2d_input.checked_type.dtype == "int8"
+            and conv2d_weight.checked_type.dtype == "int8"
+            and pattern.checked_type.dtype == "int8"
+            and bias_dtype == "int32"
+            and all([zp == 0 for zp in kernel_zp])
+            and (not is_depthwise or bias_add is not None)
+        )
+        return ret
+
+    def check_qnn_conv2d_pad(pattern):

Review Comment:
   It looks like pattern_table API does not support this. What I can do is 
this: Create a sub function that will get called from the other as both of them 
have many common checks.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to