You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "abhikran-quic (via GitHub)" <gi...@apache.org> on 2023/07/24 12:02:50 UTC

[GitHub] [tvm] abhikran-quic opened a new pull request, #15390: [Unity] Lowering of axis separator in Layout Transform

abhikran-quic opened a new pull request, #15390:
URL: https://github.com/apache/tvm/pull/15390

   - Enable lowering of `AXIS_SEPARATORS` in Relax Layout Transform 
   - This change has a pre-requisite [PR](https://github.com/apache/tvm/pull/15315)


-- 
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] abhikran-quic commented on pull request #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "abhikran-quic (via GitHub)" <gi...@apache.org>.
abhikran-quic commented on PR #15390:
URL: https://github.com/apache/tvm/pull/15390#issuecomment-1650254492

   cc: @junrushao @masahi @psrivas2 @sunggg @tqchen 


-- 
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] masahi merged pull request #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi merged PR #15390:
URL: https://github.com/apache/tvm/pull/15390


-- 
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] abhikran-quic commented on a diff in pull request #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "abhikran-quic (via GitHub)" <gi...@apache.org>.
abhikran-quic commented on code in PR #15390:
URL: https://github.com/apache/tvm/pull/15390#discussion_r1274875948


##########
python/tvm/relax/transform/legalize_ops/manipulate.py:
##########
@@ -167,30 +170,33 @@ def _scatter_elements(bb: BlockBuilder, call: Call) -> Expr:
 
 @register_legalize("relax.layout_transform")
 def _layout_transform(bb: BlockBuilder, call: Call) -> Expr:
+    def te_layout_transform(data, name):
+        return te.compute(
+            data.shape,
+            data,
+            name=name,
+        )

Review Comment:
   Sure. I have updated more comments in the code. Please help in reviewing them. Thank you!



-- 
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] abhikran-quic commented on a diff in pull request #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "abhikran-quic (via GitHub)" <gi...@apache.org>.
abhikran-quic commented on code in PR #15390:
URL: https://github.com/apache/tvm/pull/15390#discussion_r1274560492


##########
python/tvm/relax/transform/legalize_ops/manipulate.py:
##########
@@ -167,30 +170,33 @@ def _scatter_elements(bb: BlockBuilder, call: Call) -> Expr:
 
 @register_legalize("relax.layout_transform")
 def _layout_transform(bb: BlockBuilder, call: Call) -> Expr:
+    def te_layout_transform(data, name):
+        return te.compute(
+            data.shape,
+            data,
+            name=name,
+        )

Review Comment:
   IMHO, `gen_call_tir_inputs` will need a te function to be used (similar to how it's used in `bb.call_te`). This will help in generation of `call_args`, `output_sinfo`, `tir_vars` from a utility function.
   Another reason to use TE compute instead of TIR compute is the availability of dynamic shapes in TE.
   Eventually this helps to `transform_layout` and `set_axis_separator` directives to achieve the end goal.



-- 
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] masahi commented on a diff in pull request #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi commented on code in PR #15390:
URL: https://github.com/apache/tvm/pull/15390#discussion_r1274859160


##########
python/tvm/relax/transform/legalize_ops/manipulate.py:
##########
@@ -167,30 +170,33 @@ def _scatter_elements(bb: BlockBuilder, call: Call) -> Expr:
 
 @register_legalize("relax.layout_transform")
 def _layout_transform(bb: BlockBuilder, call: Call) -> Expr:
+    def te_layout_transform(data, name):
+        return te.compute(
+            data.shape,
+            data,
+            name=name,
+        )

Review Comment:
   I mean, please document that in the code.



-- 
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 #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15390:
URL: https://github.com/apache/tvm/pull/15390#issuecomment-1647776481

   <!---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-->
    * cc @quic-sanirudh <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] masahi commented on a diff in pull request #15390: [Unity] Lowering of axis separator in Layout Transform

Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi commented on code in PR #15390:
URL: https://github.com/apache/tvm/pull/15390#discussion_r1273991505


##########
python/tvm/relax/transform/legalize_ops/manipulate.py:
##########
@@ -167,30 +170,33 @@ def _scatter_elements(bb: BlockBuilder, call: Call) -> Expr:
 
 @register_legalize("relax.layout_transform")
 def _layout_transform(bb: BlockBuilder, call: Call) -> Expr:
+    def te_layout_transform(data, name):
+        return te.compute(
+            data.shape,
+            data,
+            name=name,
+        )

Review Comment:
   It's not clear why this te func has anything to do with layout transform.



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