Move HDP flush to CPU
This commit is contained in:
@@ -158,7 +158,6 @@ class ncclPrimitives {
|
|||||||
|
|
||||||
inline __device__ void postSend() {
|
inline __device__ void postSend() {
|
||||||
if (conn->next_hdp_reg) STORE(conn->next_hdp_reg, 0x1);
|
if (conn->next_hdp_reg) STORE(conn->next_hdp_reg, 0x1);
|
||||||
if (conn->curr_hdp_reg) STORE(conn->curr_hdp_reg, 0x1);
|
|
||||||
STORE(connTailPtr, step += SLICESTEPS);
|
STORE(connTailPtr, step += SLICESTEPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ struct ncclProxyArgs {
|
|||||||
uint64_t transmitted;
|
uint64_t transmitted;
|
||||||
uint64_t done;
|
uint64_t done;
|
||||||
uint64_t end;
|
uint64_t end;
|
||||||
|
uint64_t hdp_flushed;
|
||||||
void* requests[NCCL_STEPS];
|
void* requests[NCCL_STEPS];
|
||||||
int idle;
|
int idle;
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ ncclResult_t netSendProxy(struct ncclProxyArgs* args) {
|
|||||||
if (args->state == ncclProxyOpReady) {
|
if (args->state == ncclProxyOpReady) {
|
||||||
// Round to next multiple of sliceSteps
|
// Round to next multiple of sliceSteps
|
||||||
resources->step = ROUNDUP(resources->step, args->chunkSteps);
|
resources->step = ROUNDUP(resources->step, args->chunkSteps);
|
||||||
args->posted = args->transmitted = args->done = resources->step;
|
args->posted = args->transmitted = args->done = args->hdp_flushed = resources->step;
|
||||||
args->end = resources->step + args->nsteps;
|
args->end = resources->step + args->nsteps;
|
||||||
args->state = ncclProxyOpProgress;
|
args->state = ncclProxyOpProgress;
|
||||||
}
|
}
|
||||||
@@ -345,6 +345,11 @@ ncclResult_t netSendProxy(struct ncclProxyArgs* args) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ready) {
|
if (ready) {
|
||||||
|
// flush HDP if not done
|
||||||
|
if (resources->curr_hdp_reg && args->hdp_flushed < LOAD(recvTail)) {
|
||||||
|
args->hdp_flushed = LOAD(recvTail);
|
||||||
|
STORE(resources->curr_hdp_reg, 1);
|
||||||
|
}
|
||||||
// Data is ready, try to send.
|
// Data is ready, try to send.
|
||||||
NCCLCHECK(ncclNetIsend(resources->netSendComm, buff, size, mhandle, args->requests+buffSlot));
|
NCCLCHECK(ncclNetIsend(resources->netSendComm, buff, size, mhandle, args->requests+buffSlot));
|
||||||
if (args->requests[buffSlot] != NULL) {
|
if (args->requests[buffSlot] != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user