Sort IB devices based on device name (#413)

[ROCm/rccl commit: 2d0ed8dff6]
Este commit está contenido en:
Wenkai Du authored and GitHub committed 2021-08-03 15:32:41 -07:00
1 padre 4b082ceb32
commit de0c586bad
1 file changed
+2
+2
Ver fichero
@@ -199,6 +199,8 @@ ncclResult_t ncclIbInit(ncclDebugLogger_t logFunction) {
if (ncclNIbDevs == 0) {
INFO(NCCL_INIT|NCCL_NET, "NET/IB : No device found.");
} else {
auto cmpIbDevs = [](const void* n1, const void* n2) { return strcmp(((struct ncclIbDev*)n1)->devName, ((struct ncclIbDev*)n2)->devName); };
qsort(ncclIbDevs, ncclNIbDevs, sizeof(struct ncclIbDev), cmpIbDevs);
char line[1024];
line[0] = '\0';
for (int d=0; d<ncclNIbDevs; d++) {