Skip to content

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
@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