From f7ad39d345ffe970ae586245eeca6a38581a95a9 Mon Sep 17 00:00:00 2001 From: Bryce Adelstein Lelbach aka wash Date: Wed, 1 Apr 2020 16:50:32 -0700 Subject: [PATCH] Add explicit failure parameter to CAS in the CUB attribute cache to workaround a GCC 4.8 bug: https://godbolt.org/z/qmXYHc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed by: MichaƂ 'Griwes' Dominiak --- cub/util_device.cuh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cub/util_device.cuh b/cub/util_device.cuh index 0cbdca00b2..8ac8972ba5 100644 --- a/cub/util_device.cuh +++ b/cub/util_device.cuh @@ -293,7 +293,8 @@ public: // it by trying to set the state from `DeviceEntryReady` to // `DeviceEntryInitializing`. if (flag.compare_exchange_strong(old_status, DeviceEntryInitializing, - std::memory_order_acq_rel)) + std::memory_order_acq_rel, + std::memory_order_acquire)) { // We successfully set the state to `DeviceEntryInitializing`; // we have the lock and it's our job to initialize this entry