You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "junrushao (via GitHub)" <gi...@apache.org> on 2023/10/31 17:40:22 UTC

[PR] [Unity] Avoid Emitting Redandunt Bindings in TensorExpr Op [tvm]

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

   See the testcase for more details :)


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


Re: [PR] [Unity] Avoid Emitting Redandunt Bindings in TensorExpr Op [tvm]

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


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


Re: [PR] [Unity] Avoid Emitting Redandunt Bindings in TensorExpr Op [tvm]

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


##########
python/tvm/relax/frontend/nn/op.py:
##########
@@ -50,7 +50,8 @@ def _wrap_nested(expr: rx.Expr, name: str) -> Union[Tensor, Tuple[Tensor, ...]]:
     result : Union[Tensor, Tuple[Tensor]]
         The computed result.
     """
-    expr = BlockBuilder.current().emit(expr, name)
+    if not isinstance(expr, rx.DataflowVar):

Review Comment:
   i believe you can just do https://github.com/apache/tvm/blob/unity/python/tvm/relax/block_builder.py#L632



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