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/12/22 07:07:26 UTC

[GitHub] [tvm] srkreddy1238 commented on a diff in pull request #13649: [CLML][RELAY] Enable Pad and Conv2d layer fusion

srkreddy1238 commented on code in PR #13649:
URL: https://github.com/apache/tvm/pull/13649#discussion_r1055150087


##########
python/tvm/relay/op/contrib/clml.py:
##########
@@ -200,9 +218,18 @@ def check_conv(extract):
 
         while call.op.name != "nn.conv2d":
             call = call.args[0]
+
         attrs, args = call.attrs, call.args
         if attrs.data_layout != "NCHW":
             return False
+
+        if (
+            (not isinstance(args[0], (Var, Constant)))
+            and (args[0].op.name == "nn.pad")
+            and (len(args[0].attrs["pad_width"]) != 4)

Review Comment:
   Ideally, this check is not required. nn.pad implementation ensures pad_width length to be in sync with incoming tensor rank.



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