masahi commented on code in PR #16175:
URL: https://github.com/apache/tvm/pull/16175#discussion_r1408727772


##########
tests/python/relax/test_transform_fuse_ops_by_pattern.py:
##########
@@ -1023,5 +1024,27 @@ def main(
     assert "fused_relax_matmul_relax_add_relax_add_cutlass" in func_names
 
 
+def test_intermediate_var_to_var_binding():
+    """test the intermediate binding y1 will break the fusion"""
+
+    @I.ir_module
+    class Module:
+        @R.function
+        def main(
+            x: R.Tensor((1, 16), dtype="float16"), w: R.Tensor((16, 16), 
dtype="float16")
+        ) -> R.Tensor((1, 16), dtype="float16"):
+            with R.dataflow():
+                w1: R.Tensor((16, 16), dtype="float16") = R.permute_dims(w, 
axes=None)
+                y: R.Tensor((1, 16), dtype="float16") = R.matmul(x, w1)
+                y1: R.Tensor((1, 16), dtype="float16") = y

Review Comment:
   I think such binding can be removed by CanonicalizeBinding pass



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