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

[Relax] Lifted parameters bindings may also be function output #17232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lunderberg
Copy link
Contributor

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

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 apache#17231
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] Check failed: (it != this->var_arg_map_.end()) is false: Var is not defined
1 participant