ekalda opened a new issue, #14342:
URL: https://github.com/apache/tvm/issues/14342
### Expected behavior
Scripting a simple lowered TE program
```
type = "float32"
num = 10
A = te.placeholder((num,), dtype=type, name="A")
B = te.placeholder((num,), dtype=type, name="B")
C = te.compute((num,), lambda i: A[i] + B[i], name="C")
s = te.create_schedule([C.op])
out = schedule_to_module(s, [A, B], "my_module")
out.script()
```
Results in a following TVMScript:
```
@I.ir_module
class Module:
@T.prim_func
def my_module(A: T.Buffer((10,), "float32"), B: T.Buffer((10,),
"float32")):
T.func_attr({"from_legacy_te_schedule": True, "global_symbol":
"my_module", "tir.noalias": True})
C = T.Buffer((10,))
T.realize(C[0:10])
for i in range(10):
C[i] = A[i] + B[i]
```
We should be able to parse it, i.e.
```
tvm.script.from_source(out.script())
```
should work.
### Actual behavior
```
error: realize() missing 1 required positional argument: 'storage_scope'
--> <str>:10:9
|
10 | T.realize(C[0:10])
```
during parsing.
### Triage
* tir:parser
--
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]