-
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.
[Relax][Bugfix] LCA of PrimStructInfo must check known values
The `StructInfoLCA` determines the lowest common ancestor between two `StructInfo` annotations. This is primarily used in Relax to determine the appropriate `StructInfo` annotation for a `relax::If` node, given the `StructInfo` of each branch. Prior to this commit, when determining the LCA of two `PrimStructInfo` annotations, the `StructInfoLCA` function only inspected the datatype of `PrimStructInfo` annotations, and did not check for known values. For example, the LCA of `R.Prim(value=T.int64(128))` and `R.Prim(value=T.int64(64))` is `R.Prim("int64")`, but was incorrectly determined as `R.Prim(value=T.int64(128))` by the `StructInfoLCA` function. This commit updates `StructInfoLCA` to inspect the known values of a `PrimStructInfo`, as well as the datatype.
- Loading branch information
1 parent
3b04ddf
commit 8b7d373
Showing
2 changed files
with
112 additions
and
5 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