Skip to content

Commit

Permalink
Add fences for alltoall
Browse files Browse the repository at this point in the history
Add fences for alltoall
  • Loading branch information
cedricchevalier19 authored Jun 14, 2024
2 parents 2e34aef + ff1c526 commit f1ad0de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/impl/KokkosComm_alltoall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ void alltoall(const ExecSpace &space, const SendView &sv, const size_t sendCount
static_assert(KokkosComm::rank<SendView>() <= 1, "alltoall for SendView::rank > 1 not supported");
static_assert(KokkosComm::rank<RecvView>() <= 1, "alltoall for RecvView::rank > 1 not supported");

// Make sure views are ready
space.fence("KokkosComm::Impl::alltoall");

if (KokkosComm::PackTraits<SendView>::needs_pack(sv) || KokkosComm::PackTraits<RecvView>::needs_pack(rv)) {
throw std::runtime_error("alltoall for non-contiguous views not implemented");
} else {
Expand Down Expand Up @@ -90,6 +93,9 @@ void alltoall(const ExecSpace &space, const RecvView &rv, const size_t recvCount

static_assert(RecvView::rank <= 1, "alltoall for RecvView::rank > 1 not supported");

// Make sure views are ready
space.fence("KokkosComm::Impl::alltoall");

if (KokkosComm::PackTraits<RecvView>::needs_pack(rv)) {
throw std::runtime_error("alltoall for non-contiguous views not implemented");
} else {
Expand Down

0 comments on commit f1ad0de

Please sign in to comment.