Lunderberg commented on code in PR #16487:
URL: https://github.com/apache/tvm/pull/16487#discussion_r1478403363
##########
tests/python/relax/test_transform_fuse_tir.py:
##########
@@ -1930,5 +1930,251 @@ def main(
_check(Before, After)
+def test_inplace_simple():
+ @I.ir_module
+ class Module:
+ I.module_attrs({"foo": "bar"})
+
+ @T.prim_func(private=True)
+ def add_inplace(
+ A: T.Buffer((T.int64(10), T.int64(20)), "float32"), B:
T.Buffer((), "float32")
+ ):
+ T.func_attr({"tir.noalias": T.bool(True)})
+ for ax0, ax1 in T.grid(T.int64(10), T.int64(20)):
+ with T.block("T_add"):
+ v_ax0, v_ax1 = T.axis.remap("SS", [ax0, ax1])
+ T.reads(A[v_ax0, v_ax1], B[()])
Review Comment:
No worries, and thank you for the updates! My preference is to make the
test cases have as little extraneous information as possible, even when it
requires a few TIR/TVMScript tricks to do so.
I'm wondering if it would be useful to update the TVMScript printing, so the
`T.reads` and `T.writes` annotations are only printed if they are different
from what would automatically be inferred. That way, when developers print a
function for use in a test case, the duplicate information isn't printed.
--
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]