Fix crash when NVswitch is not visible inside a VM.


[ROCm/rccl commit: 1952325569]
Cette révision appartient à :
Sylvain Jeaugey a révisé 2020-06-26 16:35:54 -07:00
1 Parent 1f6b75ca8b
révision 5432eb8e9d
2 fichiers modifiés
+9 -4

Aucun fichier ne correspond à votre recherche

+8 -3
Voir le fichier
@@ -640,9 +640,14 @@ ncclResult_t ncclTopoGetXmlFromGpu(struct ncclXmlNode* pciNode, nvmlDevice_t nvm
if (index == -1) {
const char* busId;
NCCLCHECK(xmlGetAttr(sub, "target", &busId));
char* path;
NCCLCHECK(getPciPath(busId, &path));
NCCLCHECK(ncclTopoSetAttrFromSys(sub, path, "class", "tclass"));
if (strcmp(busId, "fffffff:ffff:ff") == 0) {
// Remote NVLink device is not visible inside this VM. Assume NVSwitch.
NCCLCHECK(xmlSetAttr(sub, "tclass", "0x068000"));
} else {
char* path;
NCCLCHECK(getPciPath(busId, &path));
NCCLCHECK(ncclTopoSetAttrFromSys(sub, path, "class", "tclass"));
}
}
}
*gpuNodeRet = gpuNode;