You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "sunggg (via GitHub)" <gi...@apache.org> on 2023/07/18 06:24:36 UTC
[GitHub] [tvm] sunggg commented on a diff in pull request #15341: [Unity][Transform] Elide redundant bindings of dataflow vars
sunggg commented on code in PR #15341:
URL: https://github.com/apache/tvm/pull/15341#discussion_r1266243695
##########
tests/python/relax/test_transform_dead_code_elimination.py:
##########
@@ -448,5 +448,79 @@ def main(
verify(Input, Expected)
+def test_elide_intermediate_dataflow_var_simple():
+ @tvm.script.ir_module
+ class Input:
+ @R.function
+ def main() -> R.Tensor((), "int32"):
+ with R.dataflow():
+ y = R.const(1)
+ n = y
+ R.output(n)
+ return n
+
+ @tvm.script.ir_module
+ class Expected:
+ @R.function
+ def main() -> R.Tensor((), "int32"):
+ with R.dataflow():
+ n = R.const(1)
+ R.output(n)
+ return n
+
+ verify(Input, Expected)
+
+
+def test_elide_intermediate_dataflow_var_match_cast():
Review Comment:
This seems like constant folding.
--
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