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

Commit

Permalink
Re-add the __try_wait API as pipeline uses internal symbols of barrie…
Browse files Browse the repository at this point in the history
…r for some reason
  • Loading branch information
wmaxey committed Jul 29, 2021
1 parent bc80e36 commit f882b5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion include/cuda/std/barrier
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public:
using arrival_token = typename __barrier_base::arrival_token;

_LIBCUDACXX_INLINE_VISIBILITY
bool try_wait(arrival_token __phase) const {
bool __try_wait(arrival_token __phase) const {
#if __CUDA_ARCH__ >= 800
if (__isShared(&__barrier)) {
int __ready = 0;
Expand Down Expand Up @@ -220,6 +220,11 @@ public:
_CUDA_VSTD::__libcpp_thread_poll_with_backoff(std::__barrier_poll_tester<barrier>(this, _CUDA_VSTD::move(__phase)));
}

_LIBCUDACXX_INLINE_VISIBILITY
bool try_wait(arrival_token __phase) const {
return __try_wait(_CUDA_VSTD::move(__phase));
}

inline _LIBCUDACXX_INLINE_VISIBILITY
bool try_wait_parity(bool __parity) const
{
Expand Down
8 changes: 7 additions & 1 deletion libcxx/include/barrier
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ public:
__barrier_base(__barrier_base const&) = delete;
__barrier_base& operator=(__barrier_base const&) = delete;

_LIBCUDACXX_INLINE_VISIBILITY
bool __try_wait(arrival_token __old) const
{
return __try_wait_phase(__old & __phase_bit);
}

_LIBCUDACXX_INLINE_VISIBILITY
bool try_wait_parity(bool __parity) const
{
Expand All @@ -370,7 +376,7 @@ public:
_LIBCUDACXX_INLINE_VISIBILITY
bool try_wait(arrival_token __old) const
{
return __try_wait_phase(__old & __phase_bit);
return __try_wait(__old);
}

_LIBCUDACXX_NODISCARD_ATTRIBUTE inline _LIBCUDACXX_INLINE_VISIBILITY
Expand Down

0 comments on commit f882b5d

Please sign in to comment.