tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Relax] Lifted parameters bindings may also be function output

Open Lunderberg opened this issue 1 year ago • 0 comments

Prior to this commit, the relax.transform.LiftTransformParams pass inspected the expression in each relax::Binding for variables that were required at runtime, but did not inspect the function's output. As a result, any value that could be computed at compile-time, and was either the function output or used in the function's output tuple, would be undefined in the inference function.

This commit updates LiftTransformParams to collect variables from both the bound value of relax::Binding, and the function's output.

While this error only impacted the shared_transform=False branch of LiftTransformParams, this commit also adds regression tests the shared_transform=True use case of LiftTransformParams.

Closes https://github.com/apache/tvm/issues/17231

Lunderberg avatar Aug 01 '24 15:08 Lunderberg