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/21 06:55:40 UTC

[GitHub] [tvm] krishnaraj36 opened a new pull request, #13649: [CLML][RELAY] Enable Pad and Conv2d layer fusion

krishnaraj36 opened a new pull request, #13649:
URL: https://github.com/apache/tvm/pull/13649

   Enabled clml supported nn.pad+nn.conv2d fusion pattern in clml pattern table


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


[GitHub] [tvm] srkreddy1238 merged pull request #13649: [CLML][RELAY] Enable Pad and Conv2d layer fusion

Posted by GitBox <gi...@apache.org>.
srkreddy1238 merged PR #13649:
URL: https://github.com/apache/tvm/pull/13649


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


[GitHub] [tvm] tvm-bot commented on pull request #13649: [CLML][RELAY] Enable Pad and Conv2d layer fusion

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13649:
URL: https://github.com/apache/tvm/pull/13649#issuecomment-1360924706

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to tag found in teams: `clml`, `relay` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


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


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

Posted by GitBox <gi...@apache.org>.
echuraev commented on code in PR #13649:
URL: https://github.com/apache/tvm/pull/13649#discussion_r1054363679


##########
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:
   Why there is such limitation on padding width?



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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
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. https://github.com/apache/tvm/blob/36d89a28fb984caa83082b034c46180a82dcd1ea/src/relay/op/nn/pad.cc#L131



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


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

Posted by GitBox <gi...@apache.org>.
krishnaraj36 commented on code in PR #13649:
URL: https://github.com/apache/tvm/pull/13649#discussion_r1057075338


##########
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:
   CLML module is expected to have input to 4D tensor shape for Pad layer, since conv2d layer input is always 4D tensor so Pad+conv2d fusion input is expected have 4D tensor always. It seems condition is redundant. Removed in updated commit.
   @srkreddy1238 @echuraev 



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