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

Commit f882b5d

Browse files
committed
Re-add the __try_wait API as pipeline uses internal symbols of barrier for some reason
1 parent bc80e36 commit f882b5d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

include/cuda/std/barrier

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public:
8787
using arrival_token = typename __barrier_base::arrival_token;
8888

8989
_LIBCUDACXX_INLINE_VISIBILITY
90-
bool try_wait(arrival_token __phase) const {
90+
bool __try_wait(arrival_token __phase) const {
9191
#if __CUDA_ARCH__ >= 800
9292
if (__isShared(&__barrier)) {
9393
int __ready = 0;
@@ -220,6 +220,11 @@ public:
220220
_CUDA_VSTD::__libcpp_thread_poll_with_backoff(std::__barrier_poll_tester<barrier>(this, _CUDA_VSTD::move(__phase)));
221221
}
222222

223+
_LIBCUDACXX_INLINE_VISIBILITY
224+
bool try_wait(arrival_token __phase) const {
225+
return __try_wait(_CUDA_VSTD::move(__phase));
226+
}
227+
223228
inline _LIBCUDACXX_INLINE_VISIBILITY
224229
bool try_wait_parity(bool __parity) const
225230
{

libcxx/include/barrier

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ public:
362362
__barrier_base(__barrier_base const&) = delete;
363363
__barrier_base& operator=(__barrier_base const&) = delete;
364364

365+
_LIBCUDACXX_INLINE_VISIBILITY
366+
bool __try_wait(arrival_token __old) const
367+
{
368+
return __try_wait_phase(__old & __phase_bit);
369+
}
370+
365371
_LIBCUDACXX_INLINE_VISIBILITY
366372
bool try_wait_parity(bool __parity) const
367373
{
@@ -370,7 +376,7 @@ public:
370376
_LIBCUDACXX_INLINE_VISIBILITY
371377
bool try_wait(arrival_token __old) const
372378
{
373-
return __try_wait_phase(__old & __phase_bit);
379+
return __try_wait(__old);
374380
}
375381

376382
_LIBCUDACXX_NODISCARD_ATTRIBUTE inline _LIBCUDACXX_INLINE_VISIBILITY

0 commit comments

Comments
 (0)