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

[TIR] Improved error messages for PrimExpr operator overloads #12638

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

Lunderberg
Copy link
Contributor

@Lunderberg Lunderberg commented Aug 29, 2022

Previously, type-checks in boolean operators on PrimExpr would state that the type is incorrect, but further investigation would be required in order to determine what expression caused the error. After this commit, error messages for these type checks include the expression that was used, and the dtype of that expression.

cc @Hzfengsy @junrushao1994

Previously, type-checks in boolean operators on `PrimExpr` would
state that the type is incorrect, but further investigation would be
required in order to determine what expression caused the error.
After this commit, error messages for these type checks include the
expression that was used, and the dtype of that expression.
Copy link
Member

@Hzfengsy Hzfengsy left a comment

Choose a reason for hiding this comment

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

LGTM

@Hzfengsy Hzfengsy merged commit 9e88723 into apache:main Aug 30, 2022
@Hzfengsy
Copy link
Member

Thanks @Lunderberg for the UX improvement

@Lunderberg Lunderberg deleted the primexpr_operator_error_messages branch August 30, 2022 13:05
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…#12638)

Previously, type-checks in boolean operators on `PrimExpr` would
state that the type is incorrect, but further investigation would be
required in order to determine what expression caused the error.
After this commit, error messages for these type checks include the
expression that was used, and the dtype of that expression.
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