Adding ASAN changes to address memory leak issue" (#1170)
Co-authored-by: akolliasAMD <akollias@amd.com>
This commit is contained in:
@@ -848,11 +848,16 @@ ncclResult_t getLocalNetCountByBw(struct ncclTopoSystem* system, int gpu, int *c
|
||||
ncclResult_t ncclTopoGetLocalNet(struct ncclTopoSystem* system, int rank, int channelId, int* id) {
|
||||
int gpu;
|
||||
NCCLCHECK(ncclTopoRankToIndex(system, rank, &gpu));
|
||||
int* localNets;
|
||||
int* localNets = NULL;
|
||||
int localNetCount;
|
||||
NCCLCHECK(ncclTopoGetLocal(system, GPU, gpu, NET, &localNets, &localNetCount, NULL));
|
||||
int* localGpus;
|
||||
int* localGpus = NULL;
|
||||
int localGpuCount;
|
||||
if (localNetCount == 0) {
|
||||
*id = -1;
|
||||
free(localNets);
|
||||
return ncclSuccess;
|
||||
}
|
||||
NCCLCHECK(ncclTopoGetLocal(system, NET, localNets[0], GPU, &localGpus, &localGpuCount, NULL));
|
||||
int net = 0;
|
||||
for (int i = 0; i < localGpuCount; i++) {
|
||||
@@ -1000,4 +1005,4 @@ ncclResult_t ncclTopoGetCompCap(struct ncclTopoSystem* system, int* ccMin, int*
|
||||
if (ccMin) *ccMin = min;
|
||||
if (ccMax) *ccMax = max;
|
||||
return ncclSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,14 +668,16 @@ ncclResult_t ncclTopoGetXmlFromGpu(struct ncclXmlNode* pciNode, uint32_t rocmDev
|
||||
CUDACHECK(hipGetDeviceProperties(&devProp, 0));
|
||||
//extract only the releveant info from the gcnArchName attribute
|
||||
//e.g.: convert "gfx908:sramecc+:xnack-" to "gfx908"
|
||||
char gcnArchNameSubstr[6];
|
||||
char gcnArchNameSubstr[128];
|
||||
GcnArchNameFormat(devProp.gcnArchName, gcnArchNameSubstr);
|
||||
gcn = gcnArchNameSubstr;
|
||||
NCCLCHECK(xmlSetAttr(gpuNode, "gcn", gcn));
|
||||
}
|
||||
NCCLCHECK(xmlGetAttr(gpuNode, "gcn", &gcn));
|
||||
convertGcnArchToGcnArchName(gcn, &gcnArchName);
|
||||
NCCLCHECK(xmlSetAttr(gpuNode, "gcn", gcnArchName));
|
||||
if (gcn != gcnArchName) {
|
||||
NCCLCHECK(xmlSetAttr(gpuNode, "gcn", gcnArchName));
|
||||
}
|
||||
|
||||
rcclHipDeviceArch_t arch;
|
||||
NCCLCHECK(xmlGetAttrIndex(gpuNode, "arch", &index));
|
||||
|
||||
مرجع در شماره جدید
Block a user