Adding ASAN changes to address memory leak issue" (#1170)

Co-authored-by: akolliasAMD <akollias@amd.com>
This commit is contained in:
mberenjk
2024-05-08 09:16:00 -05:00
کامیت شده توسط GitHub
والد b18784d8b8
کامیت 408278209d
2فایلهای تغییر یافته به همراه12 افزوده شده و 5 حذف شده
+8 -3
مشاهده پرونده
@@ -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;
}
}
+4 -2
مشاهده پرونده
@@ -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));