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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to