Amazing progress here! So great!
I have a short question, though. When trying out the Blitz tutorial, I didn’t get how to use constant to define e.g. shapes or types
@tvm.script.ir_module
class MyModule:
@T.prim_func
def main(a: T.handle, b: T.handle):
T.func_attr({"global_symbol": "main", "tir.noalias": True})
A = T.match_buffer(a, (8,), dtype="float32")
B = T.match_buffer(b, (8,), dtype="float32")
...
I’d be interested how to do something like this:
@tvm.script.ir_module
class MyModule:
@T.prim_func
def main(a: T.handle, b: T.handle, x:int, dt: str):
T.func_attr({"global_symbol": "main", "tir.noalias": True})
A = T.match_buffer(a, (x,), dtype=dt)
B = T.match_buffer(b, (x,), dtype=dt)
if x < cond1:
...
else:
....
...
I get an error message whenever using a construct similar to this.
Is this possible. If yes, it would be great if you could give a short example.