Merge remote-tracking branch 'nccl/master' into develop
Bu işleme şunda yer alıyor:
+17
-10
@@ -358,9 +358,13 @@ static ncclResult_t ncclProxyOpToArgs(struct ncclProxyOp* op, struct ncclProxyAr
|
||||
sub->channelId = op->channelId;
|
||||
sub->nsteps = op->nsteps;
|
||||
sub->nbytes = op->nbytes;
|
||||
sub->offset = 0;
|
||||
sub->peer = op->root;
|
||||
sub->reg = op->reg;
|
||||
sub->buffer = op->buffer;
|
||||
sub->sendMhandle = op->sendMhandle;
|
||||
sub->recvMhandle = op->recvMhandle;
|
||||
sub->sendbuff = op->sendbuff;
|
||||
sub->recvbuff = op->recvbuff;
|
||||
args->nsubs = subIndex+1;
|
||||
if (subIndex) {
|
||||
if ((args->sliceSteps != op->sliceSteps) ||
|
||||
@@ -639,7 +643,7 @@ ncclResult_t ncclProxyComputeP2p(struct ncclInfo* info, struct ncclProxyOp* op,
|
||||
if (ncclParamChunkSize() != 0) {
|
||||
info->chunkSize = ncclParamChunkSize();
|
||||
}
|
||||
op->buffer = op->reg ? info->recvbuff : NULL;
|
||||
op->recvbuff = op->reg ? (uint8_t*)info->recvbuff : NULL;
|
||||
op->chunkSize = info->chunkSize;
|
||||
op->nbytes = info->count;
|
||||
|
||||
@@ -825,7 +829,7 @@ static int setProxyThreadContext(struct ncclProxyState* proxyState) {
|
||||
if (createThreadContext) {
|
||||
if (proxyState->cudaCtx == NULL) {
|
||||
if (CUPFN(cuCtxCreate(&proxyState->cudaCtx,
|
||||
CU_CTX_SCHED_SPIN|CU_CTX_MAP_HOST, proxyState->cudaDev)) != CUDA_SUCCESS) {
|
||||
NULL, 0, CU_CTX_SCHED_SPIN|CU_CTX_MAP_HOST, proxyState->cudaDev)) != CUDA_SUCCESS) {
|
||||
WARN("Failed to create CUDA context on device %d", proxyState->cudaDev);
|
||||
createThreadContext = 0;
|
||||
}
|
||||
@@ -1088,7 +1092,8 @@ ncclResult_t ncclProxyConnect(struct ncclComm* comm, int transport, int send, in
|
||||
ncclResult_t ncclProxyCallBlockingUDS(struct ncclComm* comm, int tpRank, int type, void* reqBuff, int reqSize, void* respBuff, int respSize, int *respFd) {
|
||||
ncclResult_t res = ncclSuccess;
|
||||
struct ncclIpcSocket ipcSock = { 0 };
|
||||
void *opId = (void*)((((uintptr_t)random()) << 32) | random());
|
||||
void *opId;
|
||||
NCCLCHECK(getRandomData(&opId, sizeof(opId)));
|
||||
|
||||
int rank = comm->topParentLocalRanks[comm->localRank];
|
||||
struct ncclProxyState* sharedProxyState = comm->proxyState;
|
||||
@@ -1371,6 +1376,12 @@ static ncclResult_t proxyProgressAsync(struct ncclProxyAsyncOp* op, struct ncclP
|
||||
else if (op->type == ncclProxyMsgInit) {
|
||||
TRACE(NCCL_PROXY, "proxyProgressAsync::ncclProxyMsgInit opId=%p op.reqBuff=%p", op->opId, op->reqBuff);
|
||||
res = proxyConnInit(peer, connectionPool, proxyState, (ncclProxyInitReq*) op->reqBuff, (ncclProxyInitResp*) op->respBuff, &op->connection);
|
||||
} else if (op->type == ncclProxyMsgRegister) {
|
||||
TRACE(NCCL_PROXY, "proxyProgressAsync::ncclProxyMsgRegister opId=%p op.reqBuff=%p, op->reqSize=%d, op->respSize=%d", op->opId, op->reqBuff, op->reqSize, op->respSize);
|
||||
res = op->connection->tcomm->proxyRegister(op->connection, proxyState, op->reqBuff, op->reqSize, op->respBuff, op->respSize, &done);
|
||||
} else if (op->type == ncclProxyMsgDeregister) {
|
||||
TRACE(NCCL_PROXY, "proxyProgressAsync::ncclProxyMsgDeregister opId=%p op.reqBuff=%p, op->reqSize=%d, op->respSize=%d", op->opId, op->reqBuff, op->reqSize, op->respSize);
|
||||
res = op->connection->tcomm->proxyDeregister(op->connection, proxyState, op->reqBuff, op->reqSize, &done);
|
||||
} else return ncclInternalError;
|
||||
|
||||
if (done) {
|
||||
@@ -1441,6 +1452,8 @@ static bool proxyMatchOpType(int type) {
|
||||
case ncclProxyMsgSetup:
|
||||
case ncclProxyMsgConnect:
|
||||
case ncclProxyMsgGetFd:
|
||||
case ncclProxyMsgRegister:
|
||||
case ncclProxyMsgDeregister:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -1669,12 +1682,6 @@ ncclResult_t ncclProxyInit(struct ncclComm* comm, struct ncclSocket* sock, union
|
||||
|
||||
// UDS support
|
||||
NCCLCHECK(ncclIpcSocketInit(&comm->proxyState->ipcSock, comm->rank, peerAddressesUDS[comm->rank], comm->abortFlag));
|
||||
// Seed the random number generator for UDS filename generation
|
||||
struct timeval time;
|
||||
gettimeofday(&time,NULL);
|
||||
unsigned int seed = time.tv_sec*time.tv_usec;
|
||||
seed ^= getpid();
|
||||
srandom(seed);
|
||||
return ncclSuccess;
|
||||
}
|
||||
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle