prevent segfault from npkit-enabled rccl build

Signed-off-by: AtlantaPepsi <timhu102@amd.com>
Šī revīzija ir iekļauta:
AtlantaPepsi
2024-04-26 10:54:27 -05:00
vecāks 9e0c9b4ed8
revīzija 67246649ac
+7
Parādīt failu
@@ -1208,6 +1208,13 @@ static ncclResult_t initTransportsRank(struct ncclComm* comm, struct ncclComm* p
ret = ncclInternalError;
goto fail;
}
#if defined(ENABLE_NPKIT)
if (intraProcRanks != 1) {
WARN("NPKit currently does not support more than 1 device per process");
ret = ncclInternalError;
goto fail;
}
#endif
struct ncclComm* comm0 = comm->peerInfo[intraProcRank0].comm;
assert(intraProcRank==0 ? comm==comm0 : true);
comm->intraComm0 = comm0;