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

This commit is contained in:
Wenkai Du authored and GitHub committed 2023-11-16 09:57:25 -06:00
1 parent 15fa77bb57
commit 569d3f7d59
2 files changed
+2 -11

No files matched your search

+1 -1
View File
@@ -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;