From 2c6460ce72a39bcfd8902c8c638eb2586cf4a89e Mon Sep 17 00:00:00 2001 From: Saeed Maleki Date: Mon, 3 Apr 2023 04:36:20 +0000 Subject: [PATCH] bug fix for allgather0 --- tests/allgather_test.cu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/allgather_test.cu b/tests/allgather_test.cu index 05cfd6de..05aa3304 100644 --- a/tests/allgather_test.cu +++ b/tests/allgather_test.cu @@ -53,16 +53,16 @@ __device__ void allgather0(mscclppDevConn_t devConn, int rank, int world_size, i // this thread's role is a sender role // put your data asynchronously - if (threadIdx.x % 32 != 0) + if ((threadIdx.x % 32) == 0) devConn.putWithSignal(rank * nelemsPerGPU * sizeof(int), nelemsPerGPU * sizeof(int)); // make sure everyone is put their data before some thread randomly blocks everyone else in signal __syncthreads(); // push with flag and sync to make sure the data is received - if (threadIdx.x % 32 != 0) + if ((threadIdx.x % 32) == 0) devConn.flush(); // this thread's role is a receiver role. wait on the semaphore to make sure the data is ready - if (threadIdx.x % 32 != 0) + if ((threadIdx.x % 32) == 0) devConn.wait(); }