Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 41727c2

Browse files
authored
[SYCL] Disable reduction tests due to sporadic SegFaults in level_zero:gpu (#457)
This patch also eliminates compilation warnings caused by usage of deprecated type ::half (replaced by sycl::half), and enables some tests for ACC. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent 9497780 commit 41727c2

19 files changed

+55
-12
lines changed

SYCL/Reduction/reduction_nd_range_scalar.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ int test(queue &Q, T Identity, T Init, BinaryOperation BOp,
3030
return 0;
3131
}
3232

33+
// TODO: Perhaps, this is a _temporary_ fix for CI. The test may run
34+
// for too long when the range is big. That is especially bad on ACC.
35+
if (GlobalRange.size() > 65536 && Q.get_device().is_accelerator()) {
36+
std::cout << " SKIPPED due to risk of timeout in CI" << std::endl;
37+
return 0;
38+
}
39+
3340
buffer<T, Dims> InBuf(GlobalRange);
3441
buffer<T, 1> OutBuf(1);
3542

SYCL/Reduction/reduction_nd_s0_dw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
8+
69
// This test performs basic checks of parallel_for(nd_range, reduction, func)
710
// with reductions initialized with 0-dimensional discard_write accessor.
811

SYCL/Reduction/reduction_nd_s0_rw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
8+
69
// This test performs basic checks of parallel_for(nd_range, reduction, func)
710
// with reductions initialized with 0-dimensional read_write accessor.
811

SYCL/Reduction/reduction_nd_s1_dw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
66

7+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
8+
// UNSUPPORTED: linux && level_zero
9+
710
// This test performs basic checks of parallel_for(nd_range, reduction, func)
811
// with reductions initialized with 1-dimensional discard_write accessor
912
// accessing 1 element buffer.

SYCL/Reduction/reduction_nd_s1_rw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
8+
69
// This test performs basic checks of parallel_for(nd_range, reduction, func)
710
// with reductions initialized with 1-dimensional read_write accessor
811
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_1d_s0_dw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// implementation. Enable testing when implementation is fixed.
77
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
88

9+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
10+
// UNSUPPORTED: linux && level_zero
11+
912
// This test performs basic checks of parallel_for(range<1>, reduction, func)
1013
// with reductions initialized with 0-dimensional discard_write accessor
1114
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_1d_s0_rw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// implementation. Enable testing when implementation is fixed.
77
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
88

9+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
10+
// UNSUPPORTED: linux && level_zero
11+
912
// This test performs basic checks of parallel_for(range<1>, reduction, func)
1013
// with reductions initialized with 0-dimensional read_write accessor
1114
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_1d_s1_dw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
8+
69
#include "reduction_range_scalar.hpp"
710

811
// This test performs basic checks of parallel_for(range<1>, reduction, func)

SYCL/Reduction/reduction_range_1d_s1_rw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
8+
69
// This test performs basic checks of parallel_for(range<1>, reduction, func)
710
// with reductions initialized with 1-dimensional read_write accessor
811
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_2d_s1_dw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// implementation. Enable testing when implementation is fixed.
77
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
88

9+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
10+
// UNSUPPORTED: linux && level_zero
11+
912
// This test performs basic checks of parallel_for(range<2>, reduction, func)
1013
// with reductions initialized with 1-dimensional discard_write accessor
1114
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_2d_s1_rw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// implementation. Enable testing when implementation is fixed.
77
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
88

9+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
10+
// UNSUPPORTED: linux && level_zero
11+
912
// This test performs basic checks of parallel_for(range<2>, reduction, func)
1013
// with reductions initialized with 1-dimensional discard_write accessor
1114
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_3d_s1_dw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// implementation. Enable testing when implementation is fixed.
77
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
88

9+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
10+
// UNSUPPORTED: linux && level_zero
11+
912
// This test performs basic checks of parallel_for(range<3>, reduction, func)
1013
// with reductions initialized with 1-dimensional discard_write accessor
1114
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_3d_s1_rw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// implementation. Enable testing when implementation is fixed.
77
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
88

9+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
10+
// UNSUPPORTED: linux && level_zero
11+
912
// This test performs basic checks of parallel_for(range<3>, reduction, func)
1013
// with reductions initialized with 1-dimensional discard_write accessor
1114
// accessing 1 element buffer.

SYCL/Reduction/reduction_range_lambda.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %CPU_RUN_PLACEHOLDER %t.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4-
5-
// TODO: accelerator may not suport atomics required by the current
6-
// implementation. Enable testing when implementation is fixed.
7-
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
4+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
85

96
// This test performs basic checks of parallel_for(range, reduction, lambda)
107
// with reductions initialized with 1-dimensional accessor accessing

SYCL/Reduction/reduction_range_scalar.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int test(queue &Q, T Identity, T Init, BinaryOperation BOp,
3232

3333
// TODO: Perhaps, this is a _temporary_ fix for CI. The test may run
3434
// for too long when the range is big. That is especially bad on ACC.
35-
if (Range.size() > 65536) {
35+
if (Range.size() > 65536 && Q.get_device().is_accelerator()) {
3636
std::cout << " SKIPPED due to risk of timeout in CI" << std::endl;
3737
return 0;
3838
}

SYCL/Reduction/reduction_range_usm_dw.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %CPU_RUN_PLACEHOLDER %t.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
45

5-
// TODO: accelerator may not suport atomics required by the current
6-
// implementation. Enable testing when implementation is fixed.
7-
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
88

99
#include "reduction_range_scalar.hpp"
1010

SYCL/Reduction/reduction_usm.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
7+
// UNSUPPORTED: linux && level_zero
8+
69
// This test performs basic checks of parallel_for(nd_range, reduction, func)
710
// with reductions initialized with USM var. It tests both
811
// ext::oneapi::reduction and SYCL-2020 reduction (sycl::reduction) assuming

SYCL/Reduction/reduction_usm_dw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// RUN: %CPU_RUN_PLACEHOLDER %t.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
5-
// TODO test disabled due to Jenkins testing failure on unrelated commit
6-
// failed on Linux level_zero only
5+
6+
// TODO: test disabled due to sporadic fails in level_zero:gpu RT.
77
// UNSUPPORTED: linux && level_zero
88

99
// This test performs basic checks of parallel_for(nd_range, reduction, func)

SYCL/Reduction/reduction_utils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void printTestLabel(bool IsSYCL2020, const RangeT &Range, bool ToCERR = false) {
195195
}
196196

197197
template <typename BOp, typename T> constexpr bool isPreciseResultFP() {
198-
return (std::is_floating_point_v<T> || std::is_same_v<T, half>)&&(
198+
return (std::is_floating_point_v<T> || std::is_same_v<T, sycl::half>)&&(
199199
std::is_same_v<ext::oneapi::minimum<>, BOp> ||
200200
std::is_same_v<ext::oneapi::minimum<T>, BOp> ||
201201
std::is_same_v<ext::oneapi::maximum<>, BOp> ||
@@ -209,7 +209,7 @@ int checkResults(queue &Q, bool IsSYCL2020, BinaryOperation,
209209
std::string ErrorStr;
210210
bool Passed;
211211

212-
if constexpr (std::is_floating_point_v<T> || std::is_same_v<T, half>) {
212+
if constexpr (std::is_floating_point_v<T> || std::is_same_v<T, sycl::half>) {
213213
// It is a pretty simple and naive FP diff check here, which though
214214
// should work reasonably well for most of cases handled in reduction
215215
// tests.

0 commit comments

Comments
 (0)