Skip to content

Conversation

@Lunderberg
Copy link
Contributor

Previously, the error messasge from FindPrimFuncFrame, FindBlockFrame, and FindIfFrame stated that they could not find the requested frame when the top-most frame did not match the requested type. This error message could be misinterpreted by a user as stating that the frame didn't exist at all.

This commit updates the error message to distinguish between the case of a missing frame (e.g. T.reads() occurring outside of any T.block() frame) and a frame not being top-most (e.g. T.reads() occurring inside a T.block(), but inside an if conditional instead of the top of the block).

Previously, the error messasge from `FindPrimFuncFrame`,
`FindBlockFrame`, and `FindIfFrame` stated that they could not find
the requested frame when the top-most frame did not match the
requested type.  This error message could be misinterpreted by a user
as stating that the frame didn't exist at all.

This commit updates the error message to distinguish between the case
of a missing frame (e.g. `T.reads()` occurring outside of any
`T.block()` frame) and a frame not being top-most (e.g. `T.reads()`
occurring inside a `T.block()`, but inside an `if` conditional instead
of the top of the block).
@tvm-bot
Copy link
Collaborator

tvm-bot commented Mar 24, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

Copy link
Contributor

@cyx-6 cyx-6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cyx-6 cyx-6 merged commit b3a5e18 into apache:main Mar 28, 2023
@Lunderberg Lunderberg deleted the tvmscript_frame_error_message branch March 29, 2023 13:16
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.

3 participants