masahi commented on code in PR #14097:
URL: https://github.com/apache/tvm/pull/14097#discussion_r1115125227
##########
tests/python/relax/test_transform_fuse_ops_by_pattern.py:
##########
@@ -385,6 +385,42 @@ def gv(
return gv1
[email protected]_module
+class AddWithSameOperands:
+ @R.function
+ def main(
+ data: R.Tensor((1, 64, 56, 56), "float32"),
+ ):
+ with R.dataflow():
+ out = R.add(data, data)
+ R.output(out)
+
+ return out
+
+
[email protected]_module
+class AddWithSameOperands_partitioned:
+ @R.function
+ def fused_relax_add(
+ data: R.Tensor((1, 64, 56, 56), dtype="float32"),
+ data_1: R.Tensor((1, 64, 56, 56), dtype="float32"),
+ ) -> R.Tensor((1, 64, 56, 56), dtype="float32"):
+ R.func_attr({"Composite": "tensorrt.add", "Primitive": 1})
+ with R.dataflow():
+ gv: R.Tensor((1, 64, 56, 56), dtype="float32") = R.add(data, data)
Review Comment:
oops I just noticed that the RHS should be `data_1`... will fix today
--
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]