Skip to content

Commit

Permalink
[SYCL][COMPAT][Docs] Updated nd_barrier readme info
Browse files Browse the repository at this point in the history
  • Loading branch information
Alcpz committed Apr 9, 2024
1 parent 59beb7e commit 1ff4250
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sycl/doc/syclcompat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1129,17 +1129,24 @@ spec, and so should be used with caution.
namespace syclcompat {
namespace experimental {
#if defined(__AMDGPU__) || defined(__NVPTX__)
// seq_cst currently not working with AMD and Nvidia Backends
constexpr sycl::memory_order barrier_memory_order = sycl::memory_order::acq_rel;
#else
constexpr sycl::memory_order barrier_memory_order = sycl::memory_order::seq_cst;
#endif
template <int dimensions = 3>
inline void nd_range_barrier(
sycl::nd_item<dimensions> item,
sycl::atomic_ref<unsigned int, sycl::memory_order::acq_rel,
sycl::atomic_ref<unsigned int, barrier_memory_order,
sycl::memory_scope::device,
sycl::access::address_space::global_space> &counter);
template <>
inline void nd_range_barrier(
sycl::nd_item<1> item,
sycl::atomic_ref<unsigned int, sycl::memory_order::acq_rel,
sycl::atomic_ref<unsigned int, barrier_memory_order,
sycl::memory_scope::device,
sycl::access::address_space::global_space> &counter);
Expand Down

0 comments on commit 1ff4250

Please sign in to comment.