Skip to content

[Relax][Analysis] Validate global_symbol on non-Relax functions - #17203

Closed
Lunderberg wants to merge 2 commits into
apache:mainfrom
Lunderberg:well_formed_global_symbol_on_all_ir_types
Closed

Lunderberg wants to merge 2 commits into
apache:mainfrom
Lunderberg:well_formed_global_symbol_on_all_ir_types

Conversation

@Lunderberg

Copy link
Copy Markdown
Contributor

Prior to this commit, the well-formed checker verified that the "global_symbol" attribute, if present, matches the name of the GlobalVar. However, this check was only applied for Relax functions. As a result, discrepencies between the "global_symbol" and the gvar->name_hint could result in unexpected bugs. (For example, #17176.)

This commit updates the well-formed checker to verify "global_symbol" on all functions in an IRModule.

@Lunderberg

Copy link
Copy Markdown
Contributor Author

I expect this PR to fail CI, as #17202 resolves a failure mode that this change is designed to detect. (Though that isn't necessarily the only case that this check will catch.)

Prior to this commit, the well-formed checker verified that the
`"global_symbol"` attribute, if present, matches the name of the
`GlobalVar`.  However, this check was only applied for Relax
functions.  As a result, discrepencies between the `"global_symbol"`
and the `gvar->name_hint` could result in unexpected bugs.  (For
example, apache#17176.)

This commit updates the well-formed checker to verify
`"global_symbol"` on all functions in an `IRModule`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants