Use a map to host scratch buffers (#1004)

* Use a map to host scratch buffers

* Address review feedbacks. Deliberately keep mscclSetupScratch function.
This commit is contained in:
Wen-Heng (Jack) Chung authored and GitHub committed 2023-12-05 13:15:28 -06:00
1 parent bc44e3faa7
commit 293f0fb752
3 files changed
+16 -14

No files matched your search

+1 -2
View File
@@ -205,8 +205,7 @@ struct mscclStatus {
std::map<mscclAlgoHandle_t, mscclAlgo *> hostAlgos;
std::map<mscclAlgoHandle_t, mscclAlgo *> devAlgos;
struct mscclFlag* syncFlags;
void *scratchBuffer;
uint64_t scratchBufferSize;
std::map<size_t, void *> scratchBuffers;
size_t nBytes;
int stepSize;
int chunkSteps;