junrushao1994 opened a new pull request, #11518:
URL: https://github.com/apache/tvm/pull/11518

   TVMScript auto-completion mistakenly adds reads/writes buffer regions to the 
root block, when the computation is 0-dimensional. For example,
   
   ```python
   >> from tvm import te
   >> a = te.placeholder((), name="a", dtype="int32")
   >> b = te.placeholder((), name="b", dtype="int32")
   >> c = te.compute(a.shape, lambda *i: a(*i) + b(*i), name="c")
   >> f = te.create_prim_func([a, b, c])
   >> print(f.body.block.reads)
   [a[], b[]]
   >> print(f.body.block.writes)
   [c[]]
   ```
   
   This PR fixes this issue by enforcing the root block to have empty 
read/write regions.


-- 
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]

Reply via email to