Skip to content
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] Clean up sub-group class API #12945

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions sycl/include/sycl/sub_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ struct sub_group {

/* --- one-input shuffles --- */
/* indices in [0 , sub_group size) */

template <typename T> T shuffle(T x, id_type local_id) const {
template <typename T>
__SYCL_DEPRECATED("Shuffles in the sub-group class are deprecated.")
T shuffle(T x, id_type local_id) const {
#ifdef __SYCL_DEVICE_ONLY__
return sycl::detail::spirv::SubgroupShuffle(x, local_id);
#else
Expand All @@ -231,7 +232,9 @@ struct sub_group {
#endif
}

template <typename T> T shuffle_down(T x, uint32_t delta) const {
template <typename T>
__SYCL_DEPRECATED("Shuffles in the sub-group class are deprecated.")
T shuffle_down(T x, uint32_t delta) const {
#ifdef __SYCL_DEVICE_ONLY__
return sycl::detail::spirv::SubgroupShuffleDown(x, delta);
#else
Expand All @@ -242,7 +245,9 @@ struct sub_group {
#endif
}

template <typename T> T shuffle_up(T x, uint32_t delta) const {
template <typename T>
__SYCL_DEPRECATED("Shuffles in the sub-group class are deprecated.")
T shuffle_up(T x, uint32_t delta) const {
#ifdef __SYCL_DEVICE_ONLY__
return sycl::detail::spirv::SubgroupShuffleUp(x, delta);
#else
Expand All @@ -253,7 +258,9 @@ struct sub_group {
#endif
}

template <typename T> T shuffle_xor(T x, id_type value) const {
template <typename T>
__SYCL_DEPRECATED("Shuffles in the sub-group class are deprecated.")
T shuffle_xor(T x, id_type value) const {
#ifdef __SYCL_DEVICE_ONLY__
return sycl::detail::spirv::SubgroupShuffleXor(x, value);
#else
Expand Down Expand Up @@ -358,7 +365,7 @@ struct sub_group {
}
return res;
}
#else // __NVPTX__ || __AMDGCN__
#else // __NVPTX__ || __AMDGCN__
template <int N, typename CVT, access::address_space Space,
access::decorated IsDecorated, typename T = std::remove_cv_t<CVT>>
std::enable_if_t<
Expand Down Expand Up @@ -608,6 +615,7 @@ struct sub_group {
}

/* --- synchronization functions --- */
__SYCL_DEPRECATED("Sub-group barrier with no arguments is deprecated.")
void barrier() const {
#ifdef __SYCL_DEVICE_ONLY__
__spirv_ControlBarrier(
Expand Down Expand Up @@ -636,6 +644,7 @@ struct sub_group {
#endif
}

#ifndef __INTEL_PREVIEW_BREAKING_CHANGES__
/* --- deprecated collective functions --- */
template <typename T>
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
Expand Down Expand Up @@ -752,6 +761,7 @@ struct sub_group {
"Sub-groups are not supported on host.");
#endif
}
#endif // __INTEL_PREVIEW_BREAKING_CHANGES__

linear_id_type get_group_linear_range() const {
#ifdef __SYCL_DEVICE_ONLY__
Expand Down
Loading