Skip to content

Commit

Permalink
fifo should be correct now as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
eschouks committed Oct 6, 2023
1 parent 939c97a commit d985516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fifo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ MSCCLPP_API_CPP ProxyTrigger Fifo::poll() {
}

MSCCLPP_API_CPP void Fifo::pop() {
*(volatile uint64_t*)(&pimpl->triggers.get()[pimpl->hostTail % pimpl->size]) = 0;
cuda::atomic_ref<uint64_t, cuda::thread_scope_system>{pimpl->triggers.get()[pimpl->hostTail % pimpl->size].fst}.store(
0, cuda::memory_order_release);

(pimpl->hostTail)++;
}

Expand Down
1 change: 1 addition & 0 deletions src/semaphore.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#include <cuda/atomic>
#include <mscclpp/semaphore.hpp>

#include "api.h"
Expand Down

0 comments on commit d985516

Please sign in to comment.