-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TVMScript][Relax] Preserve tir.SizeVar through TVMScript round-trip (#…
…17083) * [TVMScript][Relax] Preserve tir.SizeVar through TVMScript round-trip Prior to this commit, all symbolic variables were printed identically, regardless of whether the underlying variable was a `tir.Var` or `tir.SizeVar`. As a result, numeric simplifications that rely on a `tir.SizeVar` being non-negative may be skipped after a round-trip through TVMScript. This commit updates the TVMScript printing and parsing of Relax functions to use `var = T.int64(is_size_var=True)` for `tir.SizeVar`, matching how `tir.SizeVar` is parsed for TIR functions. As an added benefit, this also allows Relax functions `R.Prim` arguments other than `int64` to be benefit. This may be useful in the future, such as to specify the fill value for `R.full`. * Remove strict=True argument, not available until python 3.10 * lint fix * Fix breakage in unit tests
- Loading branch information
1 parent
0fb5365
commit 5618628
Showing
3 changed files
with
71 additions
and
6 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