-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL][ABI-Break] Drop pi::assertion #14624
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
[SYCL][ABI-Break] Drop pi::assertion #14624
Conversation
This function should not be exported, but looking at its uses it seems like they call can be replaced with regular `assert` or a `static_assert` without hurting any functionality.
// TODO: see if more sanity checks are possible. | ||
sycl::detail::pi::assertion((sizeof(From) == sizeof(To)), | ||
"assert: cast failed size check"); | ||
static_assert(sizeof(From) == sizeof(To), "cast failed size check"); |
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.
This could even have performance benefits! 🥳
value.size() == 1, | ||
"Temporary workaround requires that the " | ||
"size of the input vector for make_event be equal to one."); | ||
assert(value.size() == 1 && |
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.
technically, it's different behavior in release build (where new assert
will be simply ignored), but I'm fine with that.
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 think this is more for correctness of our own SYCL RT code an all our tests are done with assertions enabled, so we should be able to catch it early still
I doubt that it is caused by my changes, but I don't know if that's a known issue or not |
I've reported the failure in #14653. Considering that this patch should effectively be a non-functional change, I will proceed with the merge. |
This function should not be exported and looking at its uses it seems like they call can be replaced with regular
assert
or astatic_assert
without hurting any functionality.This is patch is essentially a by-product of #14145 and it is done to simplify that change, i.e. PI plugins removal should not be ABI-breaking by itself, we just need to cleanup some of our exported symbols.