-
Notifications
You must be signed in to change notification settings - Fork 807
[UR] better assertions #20169
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
base: sycl
Are you sure you want to change the base?
[UR] better assertions #20169
Conversation
lslusarczyk
commented
Sep 23, 2025
- added printing backtrace to assertions
- added debug and production assertions that break code immediately instead of throwing exception
- asserting code immediately instead of throwing exception in debug mode for faster development
- uninlining create_logger function
- moved backtrace code from validation layer to common code
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.
SYCL changes LGTM
default: | ||
throw UR_RESULT_ERROR_INVALID_ARGUMENT; | ||
case UR_USM_TYPE_UNKNOWN: | ||
case UR_USM_TYPE_FORCE_UINT32:; // silence warning, fail below |
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.
nit: If you were to leave the default
case and call UR_FFAILURE
there, wouldn't the warning disappear?
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.
removing default and having all cases listed explicitly makes this code to produce warning when someone will add a new enum and forget to change this switch