tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Relax][Transform] Compose preproc functions in LiftTransformParams

Open Lunderberg opened this issue 1 year ago • 1 comments

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 https://github.com/apache/tvm/issues/17200

Lunderberg avatar Aug 28 '24 16:08 Lunderberg

This PR relies on bugfixes implemented in https://github.com/apache/tvm/pull/17312 and https://github.com/apache/tvm/pull/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.

Lunderberg avatar Aug 28 '24 16:08 Lunderberg

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

Lunderberg avatar Aug 29 '24 14:08 Lunderberg