-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-136438: Make sure test_generated_cases
pass with all optimization levels
#136594
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
gh-136438: Make sure test_generated_cases
pass with all optimization levels
#136594
Conversation
test_generated_cases
pass with all optimization levels
Cc @Eclips4 |
abstract_uop_name in base_uop_names | ||
), f"All abstract uops should override base uops, but {abstract_uop_name} is not." | ||
if abstract_uop_name not in base_uop_names: | ||
raise AssertionError(f"All abstract uops should override base uops, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I'm not sure, from an architectural point of view, that raising AssertionError
manually is appropriate. I think we should change it to ValueError
and handle it in the tests. WDYM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm agree that raising ValueError
would be better. My first attempt was just to make as few changes to code as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's ok to change it in this PR. Catching an AssertionError
is semantically incorrect :)
Thank you Mikhail. |
Now tests pass with all combinations of -OO and --without-doc-strings.
Before:
-OO
#136438