Merge remote-tracking branch 'nccl/master' into develop
[ROCm/rccl commit: 9ff53eeeae]
This commit is contained in:
@@ -325,13 +325,7 @@ static ncclResult_t commFree(ncclComm_t comm) {
|
||||
* free all intra-process communicators; therefore, we only need to focus on local
|
||||
* resource cleanup in commFree(). */
|
||||
if (comm->proxyState && comm->proxyRefCountOld == 0 && comm->proxyState->thread) {
|
||||
if (*comm->abortFlag == 0) {
|
||||
/* regular thread join */
|
||||
pthread_join(comm->proxyState->thread, nullptr);
|
||||
} else {
|
||||
/* try to detach thread due to abort */
|
||||
ncclProxyTryDetach(comm->proxyState);
|
||||
}
|
||||
pthread_join(comm->proxyState->thread, nullptr);
|
||||
}
|
||||
|
||||
delete[] comm->userRedOps;
|
||||
@@ -392,7 +386,7 @@ static ncclResult_t commFree(ncclComm_t comm) {
|
||||
free(comm->sharedRes->tpRankToLocalRank);
|
||||
NCCLCHECK(ncclStrongStreamDestruct(&comm->sharedRes->hostStream));
|
||||
NCCLCHECK(ncclStrongStreamDestruct(&comm->sharedRes->deviceStream));
|
||||
NCCLCHECK(ncclProxyDestroy(comm->sharedRes->proxyState));
|
||||
NCCLCHECK(ncclProxyDestroy(comm));
|
||||
free(comm->sharedRes);
|
||||
}
|
||||
}
|
||||
@@ -413,7 +407,7 @@ static ncclResult_t commFree(ncclComm_t comm) {
|
||||
|
||||
if (ncclAtomicRefCountDecrement(comm->abortFlagRefCount) == 0) {
|
||||
NCCLCHECK(ncclCudaHostFree((void *)comm->abortFlag));
|
||||
free((void*)comm->abortFlagRefCount);
|
||||
free(comm->abortFlagRefCount);
|
||||
}
|
||||
free((void*)comm->config.netName);
|
||||
|
||||
@@ -2004,7 +1998,7 @@ exit:
|
||||
fail:
|
||||
if (comm) {
|
||||
if (comm->abortFlag) ncclCudaHostFree((void *)comm->abortFlag);
|
||||
if (comm->abortFlagRefCount) free((void*)comm->abortFlagRefCount);
|
||||
if (comm->abortFlagRefCount) free(comm->abortFlagRefCount);
|
||||
free(comm);
|
||||
}
|
||||
if (newcomm) *newcomm = NULL;
|
||||
@@ -2461,7 +2455,7 @@ fail:
|
||||
if (childComm) {
|
||||
if (comm && !comm->config.splitShare) {
|
||||
if (childComm->abortFlag) ncclCudaHostFree((void*)childComm->abortFlag);
|
||||
if (childComm->abortFlagRefCount) free((void*)childComm->abortFlagRefCount);
|
||||
if (childComm->abortFlagRefCount) free(childComm->abortFlagRefCount);
|
||||
}
|
||||
free(childComm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user