Rail optimization for rings (#1140)
- Modifies the ring creation algorithm to be friendlier to rail-optimized topologies (should not affect classic fabric topologies)
[ROCm/rccl commit: 4cb62f999a]
Cette révision appartient à :
@@ -823,6 +823,29 @@ ncclResult_t initTransportsRank_1(struct ncclComm* comm, struct allGatherInfo *a
|
||||
// Determine local Nvls support
|
||||
//NCCLCHECK(ncclNvlsInit(comm));
|
||||
|
||||
// [RCCL] Compute hostIdx (based on hostHash)
|
||||
{
|
||||
comm->topo->nHosts = 0;
|
||||
for (int r = 0; r < nranks; r++) {
|
||||
int isNewHost = 1;
|
||||
// Check if this is the first time this hostname has been used
|
||||
for (int i = 0; i < r && isNewHost; i++) {
|
||||
if (comm->peerInfo[i].hostHash == comm->peerInfo[r].hostHash)
|
||||
isNewHost = 0;
|
||||
}
|
||||
if (isNewHost)
|
||||
{
|
||||
// Check if this is the same hostname associated with this rank
|
||||
if (comm->peerInfo[r].hostHash == comm->peerInfo[rank].hostHash)
|
||||
{
|
||||
comm->topo->hostIdx = comm->topo->nHosts;
|
||||
printf("Rank %d is on host %d\n", rank, comm->topo->hostIdx);
|
||||
}
|
||||
comm->topo->nHosts++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get rings and trees
|
||||
ringGraph.id = 0;
|
||||
ringGraph.pattern = NCCL_TOPO_PATTERN_RING;
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur