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

Commit d87b3fd

Browse files
authored
[SYCL] Remove broken atomic_memory_order* tests (#783)
Removes `atomic_memory_order*` tests, which are broken. They are using the pattern: ``` auto ld = aar.load(); ld += 1; aar.store(ld); ``` and checking if the whole sequence of operations is atomic. Which it is not - only each of the operations (load/store) on its own is atomic. Before intel/llvm#4853 was merged no backend supported acquire release or sequentially consistent memory orders, so these tests were never run before. This issue was first discussed here: intel/llvm#4853 (comment)
1 parent af1ec4d commit d87b3fd

10 files changed

+1
-457
lines changed

SYCL/AtomicRef/atomic_memory_order_acq_rel.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// NOTE: Tests load and store for acquire-release memory ordering.
1111

12-
#include "atomic_memory_order_acq_rel.h"
12+
#include "atomic_memory_order.h"
1313
#include <iostream>
1414
using namespace sycl;
1515

@@ -24,21 +24,10 @@ int main() {
2424
return 0;
2525
}
2626

27-
constexpr int N = 32;
28-
2927
// Acquire-release memory order must also support both acquire and release
3028
// orderings.
3129
assert(is_supported(supported_memory_orders, memory_order::acquire) &&
3230
is_supported(supported_memory_orders, memory_order::release));
33-
acq_rel_test<int>(q, N);
34-
acq_rel_test<unsigned int>(q, N);
35-
acq_rel_test<float>(q, N);
36-
37-
// Include long tests if they are 32 bits wide
38-
if constexpr (sizeof(long) == 4) {
39-
acq_rel_test<long>(q, N);
40-
acq_rel_test<unsigned long>(q, N);
41-
}
4231

4332
std::cout << "Test passed." << std::endl;
4433
}

SYCL/AtomicRef/atomic_memory_order_acq_rel.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

SYCL/AtomicRef/atomic_memory_order_acq_rel_atomic64.cpp

Lines changed: 0 additions & 50 deletions
This file was deleted.

SYCL/AtomicRef/atomic_memory_order_acq_rel_atomic64_generic.cpp

Lines changed: 0 additions & 53 deletions
This file was deleted.

SYCL/AtomicRef/atomic_memory_order_acq_rel_generic.cpp

Lines changed: 0 additions & 47 deletions
This file was deleted.

SYCL/AtomicRef/atomic_memory_order_seq_cst.cpp

Lines changed: 0 additions & 40 deletions
This file was deleted.

SYCL/AtomicRef/atomic_memory_order_seq_cst.h

Lines changed: 0 additions & 65 deletions
This file was deleted.

SYCL/AtomicRef/atomic_memory_order_seq_cst_atomic64.cpp

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)