cyx-6 opened a new pull request, #13819:
URL: https://github.com/apache/tvm/pull/13819

   This PR implements the syntax sugar of implicit root block for new TVMScript 
printer. This syntax sugar will skip the `T.block("root")`, when the root block 
realize is simple and we shall reconstruct that root block via 
`tvm::tir::ScriptComplete` when roundtripping. For example, it will change
   ```python
   @T.prim_func
   def root_block_explicitly():
     with T.block("root"):
       a = T.alloc_buffer([128, 128])
       for i, j in T.grid(128, 128):
         with T.block():
           T.evaluate(0)
   ```
   into
   ```python
   @T.prim_func
   def main():
     a = T.alloc_buffer((128, 128))
     for i, j in T.grid(128, 128):
       with T.block(""):
         T.evaluate(0)
   ```


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