yongwww commented on code in PR #14255:
URL: https://github.com/apache/tvm/pull/14255#discussion_r1131486901
##########
tests/python/relax/test_tvmscript_parser.py:
##########
@@ -184,6 +184,39 @@ def foo(x: R.Tensor((128, 128), "float32")) ->
R.Tensor((128, 128), "float32"):
_check(TestModule, bb.get())
+def test_emit_te_primfunc_attrs():
+ @I.ir_module
+ class TestModule:
+ @T.prim_func
+ def plus_one(
+ x: T.Buffer((T.int64(128), T.int64(128)), "float32"),
+ y: T.Buffer((T.int64(128), T.int64(128)), "float32"),
+ ):
+ T.func_attr({"some_attr": "foo", "another_attr": True,
"tir.noalias": True})
+ for i, j in T.grid(T.int64(128), T.int64(128)):
+ with T.block():
+ vi, vj = T.axis.remap("SS", [i, j])
+ y[vi, vj] = x[vi, vj] + 1.0
+
+ @R.function
+ def foo(x: R.Tensor((128, 128), "float32")) -> R.Tensor((128, 128),
"float32"):
+ # TODO(Siyuan): Need to change to `TestModule.tir_func`
Review Comment:
remove this todo here, it was tracked by somewhere else
--
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]