forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TVMScript][Fix] Correct round-trip of explicit root block (apache#12673
) * [TVMScript][Fix] Correct round-trip of explicit root block Prior to this commit, when converting TIR to TVMScript, the root `tir::Block` is typically hidden. When parsing, however, `tvm::tir::ScriptComplete` will wrap the function body in a root block if the primfunc if the contains at least one block and does not already have a root block. As a result, if the root block is the only block present, it would be stripped by a round-trip. This commit tightens the condition for hiding the root `tir::Block` when converting to TVMScript, so that it is printed in cases where the autocompleter would reinsert it when parsing.
- Loading branch information
1 parent
b051cad
commit fdc6894
Showing
4 changed files
with
123 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters