diff --git a/src/collectives/device/primitives.h b/src/collectives/device/primitives.h index 8c63a6a4f1..b0d4a2938d 100644 --- a/src/collectives/device/primitives.h +++ b/src/collectives/device/primitives.h @@ -189,10 +189,13 @@ class ncclPrimitives { } } exitIfAbortBarrier(abort, abortCount); - if (tid == 0) FOR_SEND(postSendSize, realSize*sizeof(T)); - if (SEND) __threadfence_system(); - if (tid == 0) FOR_SEND(postSend); - if (tid == 0) FOR_RECV(postRecv); + if (tid == 0) + { + FOR_SEND(postSendSize, realSize*sizeof(T)); + __threadfence_system(); + FOR_SEND(postSend); + FOR_RECV(postRecv); + } for (int i=0; i