Gcn arch name (#886)

We use CMake to determine if we're compiling against a version of ROCm that supports gcnArchName and handles architecture checking appropriately. It includes a few helper functions as drop ins for the functionality we used gcnArch for before; sometimes to enable flags, and sometimes to set frequencies.
This commit is contained in:
Audrey MP
2023-09-12 15:34:40 -04:00
committed by GitHub
parent e1dc4d5e42
commit e58ec78d35
16 changed files with 193 additions and 57 deletions
+8 -1
View File
@@ -369,7 +369,14 @@ 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(xmlGetAttrInt(xmlGpu, "gcn", &gpu->gpu.gcn));
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";
}
rcclHipDeviceArch_t arch;
NCCLCHECK(xmlGetAttrInt(xmlGpu, "arch", &arch.value));
memcpy(&gpu->gpu.arch, &arch.arch, sizeof(hipDeviceArch_t));