masahi commented on code in PR #14603:
URL: https://github.com/apache/tvm/pull/14603#discussion_r1164050103
##########
tests/python/relax/test_transform_fuse_tir.py:
##########
@@ -883,5 +883,125 @@ def main(
_check(Before, Expected)
+def test_same_buffer_multiple_read():
+ @I.ir_module
+ class Module:
+ @T.prim_func
+ def concatenate(
+ rxplaceholder: T.Buffer((T.int64(1), T.int64(4), T.int64(64),
T.int64(64)), "float32"),
+ rxplaceholder_1: T.Buffer(
+ (T.int64(1), T.int64(4), T.int64(64), T.int64(64)), "float32"
+ ),
+ T_concat: T.Buffer((T.int64(2), T.int64(4), T.int64(64),
T.int64(64)), "float32"),
+ ):
+ T.func_attr({"op_pattern": 2, "tir.noalias": T.bool(True)})
+ for ax0, ax1, ax2, ax3 in T.grid(T.int64(2), T.int64(4),
T.int64(64), T.int64(64)):
+ with T.block("T_concat"):
+ v_ax0, v_ax1, v_ax2, v_ax3 = T.axis.remap("SSSS", [ax0,
ax1, ax2, ax3])
+ T.reads(
+ rxplaceholder_1[v_ax0 - T.int64(1), v_ax1, v_ax2,
v_ax3],
+ rxplaceholder[v_ax0, v_ax1, v_ax2, v_ax3],
Review Comment:
Note that in this test case, `rxplaceholder_1` and `rxplaceholder` refer to
the same buffer `inp_0`. But they are used with different access patterns.
--
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]