From 6e8d9cb532b7ac44fbb9cb461dcc884f136daba4 Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Wed, 19 Jan 2022 10:27:02 -0700 Subject: [PATCH] Port bugfix in Kokkos --- lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp index 6964d5b41b..418aa14c68 100644 --- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp +++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp @@ -694,7 +694,7 @@ std::pair CudaInternal::resize_team_scratch_space( int current_team_scratch = 0; int zero = 0; int one = 1; - while (m_team_scratch_pool[current_team_scratch].compare_exchange_weak( + while (!m_team_scratch_pool[current_team_scratch].compare_exchange_weak( zero, one, std::memory_order_release, std::memory_order_relaxed)) { current_team_scratch = (current_team_scratch + 1) % m_n_team_scratch; }