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

[Debug] Improve error messages in LiftTransformParams #16802

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

Lunderberg
Copy link
Contributor

The LiftTransformParams pass requires Relax functions that have the attr::kNumInput attribute ("num_input"). By default, it collects and applies only to functions with this attribute. If the user specifies functions that don't match this criteria, the LiftTransformParams will raise an error.

This commit improves the error messages that are raised when the specified function is missing, is not an IRModule, or is missing the kNumInput attribute. Previously the error messages were raised implicitly by IRModule::Lookup, Downcast<Function>, or Optional::value, respectively.

The `LiftTransformParams` pass requires Relax functions that have the
`attr::kNumInput` attribute (`"num_input"`).  By default, it collects
and applies only to functions with this attribute.  If the user
specifies functions that don't match this criteria, the
`LiftTransformParams` will raise an error.

This commit improves the error messages that are raised when the
specified function is missing, is not an IRModule, or is missing the
`kNumInput` attribute.  Previously the error messages were raised
implicitly by `IRModule::Lookup`, `Downcast<Function>`, or
`Optional::value`, respectively.
@vinx13 vinx13 merged commit 83e7e9b into apache:main Mar 28, 2024
19 checks passed
@Lunderberg Lunderberg deleted the error_messages_lift_transform_params branch March 29, 2024 12:51
thaisacs pushed a commit to thaisacs/tvm that referenced this pull request Apr 3, 2024
The `LiftTransformParams` pass requires Relax functions that have the
`attr::kNumInput` attribute (`"num_input"`).  By default, it collects
and applies only to functions with this attribute.  If the user
specifies functions that don't match this criteria, the
`LiftTransformParams` will raise an error.

This commit improves the error messages that are raised when the
specified function is missing, is not an IRModule, or is missing the
`kNumInput` attribute.  Previously the error messages were raised
implicitly by `IRModule::Lookup`, `Downcast<Function>`, or
`Optional::value`, respectively.
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.

2 participants