-
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.
[TIR] Use IRModuleNode::Remove to remove None in PrimFuncPass (#14494)
Prior to this commit, `PrimFuncPass` directly removed empty `PrimFunc` objects from the module's `Map<GlobalVar, BaseFunc> functions`. Because it didn't update the `global_var_map_` as well, these two maps could become out of sync. Since the `global_var_map_` is checked as part of `StructuralEqual()`, but isn't displayed when printing to TVMScript, this can result in identical printouts being flagged as non-identical. This commit updates `PrimFuncPass` to call the `IRModuleNode::Remove` method, which updates both the `functions` and `global_var_map_` variables.
- Loading branch information
1 parent
4b6e635
commit deb11d3
Showing
2 changed files
with
36 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