Skip to content

Commit e582224

Browse files
authored
[SYCL][NFC] Fix for sporadic failure of queue_parallel_for_generic test (#1976)
Signed-off-by: Ruslan Arutyunyan <[email protected]>
1 parent 9bf602c commit e582224

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sycl/test/basic_tests/queue/queue_parallel_for_generic.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
//===------------------------------------------------------------------------===//
1919

2020
#include <CL/sycl.hpp>
21+
22+
#include <cassert>
2123
#include <iostream>
2224
#include <type_traits>
2325

2426
int main() {
25-
sycl::queue q{};
27+
sycl::queue q{sycl::property::queue::in_order()};
2628
auto dev = q.get_device();
2729
auto ctx = q.get_context();
2830
constexpr int N = 8;
@@ -67,8 +69,7 @@ int main() {
6769
q.wait();
6870

6971
for (int i = 0; i < N; i++) {
70-
if (A[i] != 5)
71-
return 1;
72+
assert(A[i] == 5);
7273
}
7374
sycl::free(A, ctx);
7475
}

0 commit comments

Comments
 (0)