From fa6d7e9a63038ba13208ef8dc34b5882d4423118 Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Tue, 22 Jun 2021 08:41:49 -0700 Subject: [PATCH] Fixes for NCCL_MAX_NCHANNELS and topo_expl (#398) --- src/graph/connect.cc | 1 + tools/topo_expl/utils.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph/connect.cc b/src/graph/connect.cc index 5dbc0ad753..4ea634483e 100644 --- a/src/graph/connect.cc +++ b/src/graph/connect.cc @@ -292,6 +292,7 @@ ncclResult_t ncclTopoPostset(struct ncclComm* comm, int* firstRanks, int* treePa // Get number of channels after duplication nc *= comm->nChannels; + nc = std::min((int)ncclMaxNchannels(), nc); // Duplication should be complete now nChannels = comm->nChannels = std::min(MAXCHANNELS,nChannels*2); diff --git a/tools/topo_expl/utils.cpp b/tools/topo_expl/utils.cpp index 7610963815..269d642092 100644 --- a/tools/topo_expl/utils.cpp +++ b/tools/topo_expl/utils.cpp @@ -404,7 +404,7 @@ ncclResult_t initTransportsRank_1(struct ncclComm* comm, struct allGather1Data_t if ((comm->topo->type & RCCL_TOPO_4P2H_ROME) && (comm->topo->type & RCCL_TOPO_GDR_ALL)) { if (rcclParamP2pNetDisable() == 0) { - STORE(comm->p2pNet, 1); + comm->p2pNet = 1; INFO(NCCL_INIT, "RCCL enabled same node P2P over network"); } else