Skip to content

Commit

Permalink
arrive_tx: Trap on older architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
ahendriksen committed Aug 18, 2023
1 parent 701175b commit 904ab27
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ friend class _CUDA_VSTD::__barrier_poll_tester_parity;
)
}

_LIBCUDACXX_NODISCARD_ATTRIBUTE _LIBCUDACXX_INLINE_VISIBILITY
_LIBCUDACXX_NODISCARD_ATTRIBUTE _LIBCUDACXX_DEVICE
arrival_token arrive_tx(_CUDA_VSTD::ptrdiff_t __arrive_count_update,
_CUDA_VSTD::ptrdiff_t __transaction_count_update) {
#if (_LIBCUDACXX_DEBUG_LEVEL >= 2)
Expand All @@ -186,9 +186,7 @@ friend class _CUDA_VSTD::__barrier_poll_tester_parity;
, "r"(static_cast<_CUDA_VSTD::uint32_t>(__transaction_count_update))
: "memory");
), NV_IS_DEVICE, (
static_assert("barrier::arrive_tx is only supported for sm_90 and up.");
), NV_IS_HOST, (
static_assert("barrier::arrive_tx is only supported on device code.");
__trap(); // mbarrier.arrive.expect_tx is not supported for architectures before SM90.
)
)
return __token;
Expand Down

0 comments on commit 904ab27

Please sign in to comment.