Skip to content

Conversation

lslusarczyk
Copy link
Contributor

  • 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

Copy link
Contributor

@slawekptak slawekptak left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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

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