msccl: allocate scratch as ext-scope fine-grained (#968)

[ROCm/rccl commit: 569d3f7d59]
This commit is contained in:
Wenkai Du
2023-11-16 07:57:25 -08:00
committed by GitHub
orang tua b5642f39ed
melakukan 4c2fa05a23
2 mengubah file dengan 2 tambahan dan 11 penghapusan
@@ -73,7 +73,7 @@ ncclResult_t mscclSetupScratch(struct mscclAlgo* hostAlgo, hipStream_t stream) {
size_t sizeNeeded = (status.nBytes * (size_t)(hostAlgo->nScratchChunks)) / (size_t)(hostAlgo->nChunksPerLoop);
if (sizeNeeded > status.scratchBufferSize){
NCCLCHECK(ncclCudaFree(status.scratchBuffer));
NCCLCHECK(ncclCudaMalloc((char**)&status.scratchBuffer, sizeNeeded));
NCCLCHECK(ncclCudaMalloc((char**)&status.scratchBuffer, sizeNeeded, true));
status.scratchBufferSize = sizeNeeded;
}
return ncclSuccess;