From 9594bbee3b9caaa4d7707641eab52e57a1b7f732 Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Tue, 29 Nov 2022 13:57:10 -0800 Subject: [PATCH] Adjust P2P channels on Intel platform (#653) --- src/graph/paths.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/graph/paths.cc b/src/graph/paths.cc index bf95319b22..b0de0dc991 100644 --- a/src/graph/paths.cc +++ b/src/graph/paths.cc @@ -814,7 +814,13 @@ ncclResult_t ncclTopoComputeP2pChannels(struct ncclComm* comm) { } } - if (comm->topo->nodes[GPU].count == comm->topo->nRanks && (comm->topo->type & RCCL_TOPO_4P2H_ROME) && !(comm->topo->type & RCCL_TOPO_GDR_ALL) && !(comm->topo->type & RCCL_TOPO_XGMI_ALL)) { + int arch, vendor, model; + NCCLCHECK(ncclTopoCpuType(comm->topo, &arch, &vendor, &model)); + if (arch == NCCL_TOPO_CPU_ARCH_X86 || vendor == NCCL_TOPO_CPU_VENDOR_INTEL) { + // Adjust P2P channels on Intel platform + comm->p2pnChannelsPerPeer = 1; + comm->p2pnChannels = 2; + } else if (comm->topo->nodes[GPU].count == comm->topo->nRanks && (comm->topo->type & RCCL_TOPO_4P2H_ROME) && !(comm->topo->type & RCCL_TOPO_GDR_ALL) && !(comm->topo->type & RCCL_TOPO_XGMI_ALL)) { // Adjust P2P channels on Rome comm->p2pnChannelsPerPeer = 2; comm->p2pnChannels = 2;