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

[Bugfix][Transform] Keep private non-primitive functions in FuseTIR #16565

Conversation

Lunderberg
Copy link
Contributor

Prior to this commit, private non-primitive relax functions would be discarded by FuseTIR. If any calls to these functions exist, the resulting IRModule would be ill-formed. This commit updates FuseTIR so that it only applies updates to functions with attr::kPrimitive, and calls into those functions.

To retain backwards compatibility, DeadCodeElimination is applied as a post-processing step.

Prior to this commit, private non-primitive relax functions would be
discarded by `FuseTIR`.  If any calls to these functions exist, the
resulting `IRModule` would be ill-formed.  This commit updates
`FuseTIR` so that it only applies updates to functions with
`attr::kPrimitive`, and calls into those functions.

To retain backwards compatibility, `DeadCodeElimination` is applied as
a post-processing step.
@tqchen
Copy link
Member

tqchen commented Feb 14, 2024

cc @Hzfengsy

@Hzfengsy Hzfengsy merged commit 274c368 into apache:main Feb 14, 2024
20 checks passed
@Lunderberg Lunderberg deleted the bugfix_fusetir_preserve_private_relax_functions branch February 14, 2024 15:22
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.

None yet

3 participants