Skip to content

Commit f4ae66e

Browse files
authored
[SYCL] Mark tests that require size 32 subgroups with "REQUIRES: sg-32" (#11184)
Many AMD devices don't support size 32 subgroups. This patch skips tests for such devices. See also #11104.
1 parent 81dcdfe commit f4ae66e

9 files changed

+9
-28
lines changed

sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %{run} %t.out
33

44
// REQUIRES: gpu
5+
// REQUIRES: sg-32
56

67
#include <sycl/sycl.hpp>
78
#include <vector>
@@ -12,13 +13,6 @@ template <size_t PartitionSize> class TestKernel;
1213
template <size_t PartitionSize> void test() {
1314
sycl::queue Q;
1415

15-
auto SGSizes = Q.get_device().get_info<sycl::info::device::sub_group_sizes>();
16-
if (std::find(SGSizes.begin(), SGSizes.end(), 32) == SGSizes.end()) {
17-
std::cout << "Test skipped due to missing support for sub-group size 32."
18-
<< std::endl;
19-
return;
20-
}
21-
2216
sycl::buffer<bool, 1> MatchBuf{sycl::range{32}};
2317
sycl::buffer<bool, 1> LeaderBuf{sycl::range{32}};
2418

sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %{run} %t.out
33
//
44
// REQUIRES: gpu
5+
// REQUIRES: sg-32
56
// UNSUPPORTED: hip
67

78
#include <sycl/sycl.hpp>
@@ -14,12 +15,6 @@ template <size_t PartitionSize> void test() {
1415
sycl::queue Q;
1516

1617
constexpr uint32_t SGSize = 32;
17-
auto SGSizes = Q.get_device().get_info<sycl::info::device::sub_group_sizes>();
18-
if (std::find(SGSizes.begin(), SGSizes.end(), SGSize) == SGSizes.end()) {
19-
std::cout << "Test skipped due to missing support for sub-group size 32."
20-
<< std::endl;
21-
return;
22-
}
2318

2419
sycl::buffer<size_t, 1> TmpBuf{sycl::range{SGSize}};
2520
sycl::buffer<bool, 1> BarrierBuf{sycl::range{SGSize}};

sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %{run} %t.out
33
//
44
// REQUIRES: gpu
5+
// REQUIRES: sg-32
56
// UNSUPPORTED: cuda || hip || windows
67
// Tangle groups exhibit unpredictable behavior on Windows.
78
// The test is disabled while we investigate the root cause.
@@ -17,13 +18,6 @@ constexpr uint32_t SGSize = 32;
1718
int main() {
1819
sycl::queue Q;
1920

20-
auto SGSizes = Q.get_device().get_info<sycl::info::device::sub_group_sizes>();
21-
if (std::find(SGSizes.begin(), SGSizes.end(), SGSize) == SGSizes.end()) {
22-
std::cout << "Test skipped due to missing support for sub-group size 32."
23-
<< std::endl;
24-
return 0;
25-
}
26-
2721
sycl::buffer<size_t, 1> TmpBuf{sycl::range{SGSize}};
2822
sycl::buffer<bool, 1> BarrierBuf{sycl::range{SGSize}};
2923
sycl::buffer<bool, 1> BroadcastBuf{sycl::range{SGSize}};

sycl/test-e2e/SubGroupMask/Basic.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %{build} -o %t.out
22

33
// REQUIRES: gpu
4+
// REQUIRES: sg-32
45

56
// GroupNonUniformBallot capability is supported on Intel GPU only
67
// RUN: %{run} %t.out
@@ -24,14 +25,6 @@ int main() {
2425
#ifdef SYCL_EXT_ONEAPI_SUB_GROUP_MASK
2526
queue Queue;
2627

27-
auto sgsizes =
28-
Queue.get_device().get_info<sycl::info::device::sub_group_sizes>();
29-
if (std::find(sgsizes.begin(), sgsizes.end(), 32) == sgsizes.end()) {
30-
std::cout << "test skipped due to missing support for sub-group size 32."
31-
<< std::endl;
32-
return 0;
33-
}
34-
3528
try {
3629
nd_range<1> NdRange(global_size, local_size);
3730
int Res = 0;

sycl/test-e2e/syclcompat/util/util_logical_group.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// ===----------------------------------------------------------------------===//
3232

33+
// REQUIRES: sg-32
3334
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
3435
// RUN: %{run} %t.out
3536

sycl/test-e2e/syclcompat/util/util_permute_sub_group_by_xor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// ===----------------------------------------------------------------------===//
3232

33+
// REQUIRES: sg-32
3334
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
3435
// RUN: %{run} %t.out
3536

sycl/test-e2e/syclcompat/util/util_select_from_sub_group.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// ===----------------------------------------------------------------------===//
3232

33+
// REQUIRES: sg-32
3334
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
3435
// RUN: %{run} %t.out
3536

sycl/test-e2e/syclcompat/util/util_shift_sub_group_left.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// ===----------------------------------------------------------------------===//
3232

33+
// REQUIRES: sg-32
3334
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
3435
// RUN: %{run} %t.out
3536

sycl/test-e2e/syclcompat/util/util_shift_sub_group_right.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//
3131
// ===----------------------------------------------------------------------===//
3232

33+
// REQUIRES: sg-32
3334
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %s -o %t.out
3435
// RUN: %{run} %t.out
3536

0 commit comments

Comments
 (0)