-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Enabling depreacate warnings for sycl #15342
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?
Changes from all commits
da8bc72
6fd74a8
9ba3942
645a5e3
551a1fe
a926de6
ae91fa2
4f2e0f5
17f313f
bb43f68
18e4443
1371754
c84bbcd
9048252
bac802b
9827338
b18f45e
449f69b
3fabbf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,14 +100,24 @@ struct __SYCL2020_DEPRECATED("This type isn't device copyable in SYCL 2020") | |
IsDeprecatedDeviceCopyable<T[N]> : IsDeprecatedDeviceCopyable<T> {}; | ||
|
||
#ifdef __SYCL_DEVICE_ONLY__ | ||
// Helper trait to avoid instantiated the deprecated specializations of | ||
// IsDeprecatedDeviceCopyable when is_device_copyable_v<T> is true. | ||
template <typename T, typename = void> | ||
struct IsDeprecatedDeviceCopyableIfNot2020 : std::false_type {}; | ||
|
||
template <typename T> | ||
struct IsDeprecatedDeviceCopyableIfNot2020< | ||
T, std::enable_if_t<!is_device_copyable_v<T>>> | ||
: detail::IsDeprecatedDeviceCopyable<T> {}; | ||
|
||
// Checks that the fields of the type T with indices 0 to (NumFieldsToCheck - | ||
// 1) are device copyable. | ||
template <typename T, unsigned NumFieldsToCheck> | ||
struct CheckFieldsAreDeviceCopyable | ||
: CheckFieldsAreDeviceCopyable<T, NumFieldsToCheck - 1> { | ||
using FieldT = decltype(__builtin_field_type(T, NumFieldsToCheck - 1)); | ||
static_assert(is_device_copyable_v<FieldT> || | ||
detail::IsDeprecatedDeviceCopyable<FieldT>::value, | ||
detail::IsDeprecatedDeviceCopyableIfNot2020<FieldT>::value, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This I think it is time we let it go. I will let other reviewers to decide on which path we want to take, but we have two options here:
Considering that we had a deprecation message for it for a while now, I personally think that it is fine to go with the first option and just drop this thing completely right away There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any updates on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I would prefer that we drop it in a separate patch, just to make it easier to bisect in case it breaks something unintentionally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I have no objections against doing that in a separate PR and I agree that it may be easier for us in a potential future bisect when some customer complains that their code doesn't compile/work anymore |
||
"The specified type is not device copyable"); | ||
}; | ||
|
||
|
@@ -120,7 +130,7 @@ struct CheckBasesAreDeviceCopyable | |
: CheckBasesAreDeviceCopyable<T, NumBasesToCheck - 1> { | ||
using BaseT = decltype(__builtin_base_type(T, NumBasesToCheck - 1)); | ||
static_assert(is_device_copyable_v<BaseT> || | ||
detail::IsDeprecatedDeviceCopyable<BaseT>::value, | ||
detail::IsDeprecatedDeviceCopyableIfNot2020<BaseT>::value, | ||
"The specified type is not device copyable"); | ||
}; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.