-
Notifications
You must be signed in to change notification settings - Fork 769
[NFCI][SYCL] Use get_info_impl
(not _nocheck
) for USM info descriptors
#18453
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
Conversation
…ptors I tracked the appearance of `_nocheck` down to intel#937 and James doesn't remember anything specific requiring that vs "checked" version. Also, some similar USM-related aspects (those that don't just delegate to `get_info`) do use "checked" APIs, so it seems logical to unify this processing. The main reason I do this is that it would be a bit easier to cache the values of "checked" interfaces by pre-computing USM support in `device_impl`'s ctor. Note that we perform at least some of those every time we allocate USM memory, so doing the caching is desirable (even for the sake of cleaning up our traces).
get_info_impl
(not _nocheck
) for USM info descri…get_info_impl
(not _nocheck
) for USM info descriptors
@@ -589,33 +589,27 @@ class device_impl : public std::enable_shared_from_this<device_impl> { | |||
} | |||
|
|||
CASE(info::device::usm_device_allocations) { | |||
return get_info_impl_nocheck<UR_DEVICE_INFO_USM_DEVICE_SUPPORT>() | |||
.value_or(0) & | |||
return get_info_impl<UR_DEVICE_INFO_USM_DEVICE_SUPPORT>() & |
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.
@intel/unified-runtime-reviewers , are any of these APIs expected to return a meaningful error that isn't an indication of everything being terribly broken?
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.
no, these aren't optional queries so it should be success or catastrophic failure as you say
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.
LGTM.
I tracked the appearance of
_nocheck
down to#937 and James doesn't remember anything specific requiring that vs "checked" version. Also, some similar USM-related aspects (those that don't just delegate to
get_info
) do use "checked" APIs, so it seems logical to unify this processing.The main reason I do this is that it would be a bit easier to cache the values of "checked" interfaces by pre-computing USM support in
device_impl
's ctor. Note that we perform at least some of those every time we allocate USM memory, so doing the caching is desirable (even for the sake of cleaning up our traces).