remove gcnArch support (#920)
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
[ROCm/rccl commit: f22df90e5c]
This commit is contained in:
@@ -369,21 +369,11 @@ ncclResult_t ncclTopoAddNic(struct ncclXmlNode* xmlNic, struct ncclTopoSystem* s
|
||||
|
||||
ncclResult_t ncclTopoAddGpu(struct ncclXmlNode* xmlGpu, struct ncclTopoSystem* system, struct ncclTopoNode* gpu) {
|
||||
NCCLCHECK(xmlGetAttrInt(xmlGpu, "sm", &gpu->gpu.cudaCompCap));
|
||||
NCCLCHECK(xmlGetAttr(xmlGpu, "gcn", &gpu->gpu.gcn));
|
||||
if (strcmp(gpu->gpu.gcn, "906") == 0) {
|
||||
gpu->gpu.gcn = "gfx906";
|
||||
} else if (strcmp(gpu->gpu.gcn, "908") == 0) {
|
||||
gpu->gpu.gcn = "gfx908";
|
||||
} else if (strcmp(gpu->gpu.gcn, "910") == 0) {
|
||||
gpu->gpu.gcn = "gfx90a";
|
||||
} else if (strcmp(gpu->gpu.gcn, "940") == 0) {
|
||||
gpu->gpu.gcn = "gfx940";
|
||||
} else if (strcmp(gpu->gpu.gcn, "941") == 0) {
|
||||
gpu->gpu.gcn = "gfx941";
|
||||
} else if (strcmp(gpu->gpu.gcn, "942") == 0) {
|
||||
gpu->gpu.gcn = "gfx942";
|
||||
}
|
||||
|
||||
const char* gcnArch;
|
||||
const char* gcnArchName;
|
||||
NCCLCHECK(xmlGetAttr(xmlGpu, "gcn", &gcnArch));
|
||||
convertGcnArchToGcnArchName(gcnArch, gcnArchName);
|
||||
gpu->gpu.gcn = strdup(gcnArchName);
|
||||
rcclHipDeviceArch_t arch;
|
||||
NCCLCHECK(xmlGetAttrInt(xmlGpu, "arch", &arch.value));
|
||||
memcpy(&gpu->gpu.arch, &arch.arch, sizeof(hipDeviceArch_t));
|
||||
|
||||
@@ -636,15 +636,22 @@ ncclResult_t ncclTopoGetXmlFromGpu(struct ncclXmlNode* pciNode, uint32_t rocmDev
|
||||
int sm;
|
||||
NCCLCHECK(xmlGetAttrInt(gpuNode, "sm", &sm));
|
||||
|
||||
int gcn;
|
||||
const char* gcn;
|
||||
const char* gcnArchName;
|
||||
NCCLCHECK(xmlGetAttrIndex(gpuNode, "gcn", &index));
|
||||
if (index == -1) {
|
||||
hipDeviceProp_t devProp;
|
||||
CUDACHECK(hipGetDeviceProperties(&devProp, 0));
|
||||
gcn = devProp.gcnArch;
|
||||
NCCLCHECK(xmlSetAttrInt(gpuNode, "gcn", gcn));
|
||||
//extract only the releveant info from the gcnArchName attribute
|
||||
//e.g.: convert "gfx908:sramecc+:xnack-" to "gfx908"
|
||||
char gcnArchNameSubstr[6];
|
||||
GcnArchNameFormat(devProp.gcnArchName, gcnArchNameSubstr);
|
||||
gcn = gcnArchNameSubstr;
|
||||
NCCLCHECK(xmlSetAttr(gpuNode, "gcn", gcn));
|
||||
}
|
||||
NCCLCHECK(xmlGetAttrInt(gpuNode, "gcn", &gcn));
|
||||
NCCLCHECK(xmlGetAttr(gpuNode, "gcn", &gcn));
|
||||
convertGcnArchToGcnArchName(gcn, gcnArchName);
|
||||
NCCLCHECK(xmlSetAttr(gpuNode, "gcn", gcnArchName));
|
||||
|
||||
rcclHipDeviceArch_t arch;
|
||||
NCCLCHECK(xmlGetAttrIndex(gpuNode, "arch", &index));
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user