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

Commit

Permalink
[SYCL] Remove broken atomic_memory_order* tests (#783)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
t4c1 committed Feb 1, 2022
1 parent af1ec4d commit d87b3fd
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 457 deletions.
13 changes: 1 addition & 12 deletions SYCL/AtomicRef/atomic_memory_order_acq_rel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

#include "atomic_memory_order_acq_rel.h"
#include "atomic_memory_order.h"
#include <iostream>
using namespace sycl;

Expand All @@ -24,21 +24,10 @@ int main() {
return 0;
}

constexpr int N = 32;

// Acquire-release memory order must also support both acquire and release
// orderings.
assert(is_supported(supported_memory_orders, memory_order::acquire) &&
is_supported(supported_memory_orders, memory_order::release));
acq_rel_test<int>(q, N);
acq_rel_test<unsigned int>(q, N);
acq_rel_test<float>(q, N);

// Include long tests if they are 32 bits wide
if constexpr (sizeof(long) == 4) {
acq_rel_test<long>(q, N);
acq_rel_test<unsigned long>(q, N);
}

std::cout << "Test passed." << std::endl;
}
52 changes: 0 additions & 52 deletions SYCL/AtomicRef/atomic_memory_order_acq_rel.h

This file was deleted.

50 changes: 0 additions & 50 deletions SYCL/AtomicRef/atomic_memory_order_acq_rel_atomic64.cpp

This file was deleted.

53 changes: 0 additions & 53 deletions SYCL/AtomicRef/atomic_memory_order_acq_rel_atomic64_generic.cpp

This file was deleted.

47 changes: 0 additions & 47 deletions SYCL/AtomicRef/atomic_memory_order_acq_rel_generic.cpp

This file was deleted.

40 changes: 0 additions & 40 deletions SYCL/AtomicRef/atomic_memory_order_seq_cst.cpp

This file was deleted.

65 changes: 0 additions & 65 deletions SYCL/AtomicRef/atomic_memory_order_seq_cst.h

This file was deleted.

46 changes: 0 additions & 46 deletions SYCL/AtomicRef/atomic_memory_order_seq_cst_atomic64.cpp

This file was deleted.

0 comments on commit d87b3fd

Please sign in to comment.