You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I use a Python variable to specify the dimension of buffers? I find out that if the variable is not used inside the TVM script, then it cannot be built. Is there any other restrctions about it?
FOUR = 4
@tvm.script.ir_module
class Test:
@T.prim_func
def test(A: T.Buffer[(FOUR, FOUR), "int64"]):
T.func_attr({"global_symbol": "test"})
for i, j in T.grid(4, 4):
with T.block("Y"):
# uncommented the following line to make it works
# vk = T.axis.spatial(FOUR, i)
vi = T.axis.spatial(4, i)
vj = T.axis.spatial(4, j)
A[vi, vj] = 1
test_lib = tvm.build(Test, target="llvm")
Also, I found the printed error messages are quite confusing, will there be any lectures talking about debuging a TVMScript in the future?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How can I use a Python variable to specify the dimension of buffers? I find out that if the variable is not used inside the TVM script, then it cannot be built. Is there any other restrctions about it?
Also, I found the printed error messages are quite confusing, will there be any lectures talking about debuging a TVMScript in the future?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions