Skip to content

Conversation

@Lunderberg
Copy link
Contributor

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 #17200

@Lunderberg
Copy link
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
@Lunderberg Lunderberg force-pushed the relax_lift_transform_params_and_compose branch from fb9ba98 to d3d7213 Compare August 29, 2024 14:04
@Lunderberg
Copy link
Contributor Author

The pre-requisite PRs have landed, this PR is rebased on top of main, and is now ready for review.

@Lunderberg Lunderberg marked this pull request as ready for review August 29, 2024 14:05
@Lunderberg Lunderberg merged commit b06df84 into apache:main Sep 3, 2024
@Lunderberg Lunderberg deleted the relax_lift_transform_params_and_compose branch September 3, 2024 13:15
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.

[Bug] [Relax] InternalError: Check failed: (*it).second == var

2 participants