[Relax][Transform] Compose preproc functions in LiftTransformParams #17314
Merged
Lunderberg merged 2 commits intoapache:mainfrom Sep 3, 2024
Merged
Conversation
Contributor
Author
|
This PR relies on bugfixes implemented in #17312 and #17313. The PR branch contains these bugfixes in its history, to allow CI to run, but will need to be rebased after these per-requisites land in order to maintain a linear commit history on main. This PR is currently marked as a draft until the pre-requisites land. |
The `LiftTransformParams` pass produces additional functions, either named `$FOO_transform_params` when generating one transformation function per inference function, or `transform_params` when generating a single shared transformation function. Prior to this commit, if the `IRModule` already contained a function with that name, an error would be raised. After this commit, the `LiftTransformParams` pass will instead check for existing functions, and compose the previous transformation function with the newly-lifted transformation. This allows `LiftTransformParams` to be used alongside a hand-written parameter transformation. Closes apache#17200
fb9ba98 to
d3d7213
Compare
Contributor
Author
|
The pre-requisite PRs have landed, this PR is rebased on top of |
vinx13
approved these changes
Aug 30, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
LiftTransformParamspass produces additional functions, either named$FOO_transform_paramswhen generating one transformation function per inference function, ortransform_paramswhen generating a single shared transformation function. Prior to this commit, if theIRModulealready contained a function with that name, an error would be raised.After this commit, the
LiftTransformParamspass will instead check for existing functions, and compose the previous transformation function with the newly-lifted transformation. This allowsLiftTransformParamsto be used alongside a hand-written parameter transformation.Closes #17200