Skip to content

Commit 086eb34

Browse files
Revert "[SYCL] Remove oneapi::sub_group under preview" (#19794)
As discussed in #13258, not all of sycl_ext_oneapi_named_sub_group_sizes has replacements ready. As such, we cannot remove the sub_group class yet.
1 parent 883a2f0 commit 086eb34

File tree

4 files changed

+2
-26
lines changed

4 files changed

+2
-26
lines changed

sycl/include/sycl/detail/spirv.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ inline namespace _V1 {
3232
struct sub_group;
3333
namespace ext {
3434
namespace oneapi {
35-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
3635
struct sub_group;
37-
#endif
3836
namespace experimental {
3937
template <typename ParentGroup> class fragment;
4038

@@ -77,12 +75,9 @@ template <int Dimensions> struct group_scope<group<Dimensions>> {
7775
static constexpr __spv::Scope::Flag value = __spv::Scope::Flag::Workgroup;
7876
};
7977

80-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
8178
template <> struct group_scope<::sycl::ext::oneapi::sub_group> {
8279
static constexpr __spv::Scope::Flag value = __spv::Scope::Flag::Subgroup;
8380
};
84-
#endif
85-
8681
template <> struct group_scope<::sycl::sub_group> {
8782
static constexpr __spv::Scope::Flag value = __spv::Scope::Flag::Subgroup;
8883
};
@@ -277,13 +272,9 @@ using WidenOpenCLTypeTo32_t = std::conditional_t<
277272
template <typename Group> struct GroupId {
278273
using type = size_t;
279274
};
280-
281-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
282275
template <> struct GroupId<::sycl::ext::oneapi::sub_group> {
283276
using type = uint32_t;
284277
};
285-
#endif
286-
287278
template <> struct GroupId<::sycl::sub_group> {
288279
using type = uint32_t;
289280
};

sycl/include/sycl/detail/type_traits.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ inline namespace _V1 {
2222
template <int Dimensions> class group;
2323
struct sub_group;
2424
namespace ext::oneapi {
25-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
2625
struct sub_group;
27-
#endif
2826

2927
namespace experimental {
3028
template <typename Group, std::size_t Extent> class group_with_scratchpad;
@@ -42,12 +40,9 @@ struct is_fixed_topology_group<root_group<Dimensions>> : std::true_type {};
4240
template <int Dimensions>
4341
struct is_fixed_topology_group<sycl::group<Dimensions>> : std::true_type {};
4442

45-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
4643
template <>
4744
struct is_fixed_topology_group<sycl::ext::oneapi::sub_group> : std::true_type {
4845
};
49-
#endif
50-
5146
template <> struct is_fixed_topology_group<sycl::sub_group> : std::true_type {};
5247

5348
template <class T> struct is_user_constructed_group : std::false_type {};
@@ -79,10 +74,7 @@ struct is_group<group<Dimensions>> : std::true_type {};
7974

8075
template <typename T> struct is_sub_group : std::false_type {};
8176

82-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
8377
template <> struct is_sub_group<ext::oneapi::sub_group> : std::true_type {};
84-
#endif
85-
8678
template <> struct is_sub_group<sycl::sub_group> : std::true_type {};
8779

8880
template <typename T>

sycl/include/sycl/ext/oneapi/sub_group.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include <tuple> // for _Swallow_assign, ignore
1515

16-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
1716
namespace sycl {
1817
inline namespace _V1 {
1918
namespace ext::oneapi {
@@ -35,4 +34,3 @@ struct __SYCL_DEPRECATED("use sycl::sub_group() instead") sub_group
3534
} // namespace ext::oneapi
3635
} // namespace _V1
3736
} // namespace sycl
38-
#endif

sycl/include/sycl/ext/oneapi/sub_group_mask.hpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ template <typename Group> struct group_scope;
3838

3939
namespace ext::oneapi {
4040

41-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
4241
// forward decalre sycl::ext::oneapi::sub_group
4342
struct sub_group;
44-
#endif
4543

4644
// defining `group_ballot` here to make predicate default `true`
4745
// need to forward declare sub_group_mask first
@@ -362,11 +360,8 @@ ext::oneapi::sub_group_mask commonGroupBallotImpl(Group G, bool Predicate) {
362360
Val, __spirv_BuiltInSubgroupMaxSize());
363361
// For sub-groups we do not need to apply the mask, but for others it will
364362
// split converging groups accordingly.
365-
if constexpr (
366-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
367-
!std::is_same_v<std::decay_t<Group>, ext::oneapi::sub_group> &&
368-
#endif
369-
!std::is_same_v<std::decay_t<Group>, sycl::sub_group>)
363+
if constexpr (!std::is_same_v<std::decay_t<Group>, ext::oneapi::sub_group> &&
364+
!std::is_same_v<std::decay_t<Group>, sycl::sub_group>)
370365
Mask &= sycl::detail::GetMask(G);
371366
return Mask;
372367
}

0 commit comments

Comments
 (0)