Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Lunderberg
Copy link
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
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`.
@Lunderberg Lunderberg force-pushed the well_formed_global_symbol_on_all_ir_types branch from afc68f4 to ed94359 Compare September 16, 2024 20:30
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.

1 participant