Limit P2P channels per peer to not exceeding max channels (#1594)

* Limit P2P channels per peer to not exceeding max channels

* [UT] test single GPU cases for all collectives

* [UT] fix out of range root value

[ROCm/rccl commit: 4237caad69]
Cette révision appartient à :
Wenkai Du
2025-03-11 09:32:09 -07:00
révisé par GitHub
Parent a79fa36b77
révision afd04a5117
3 fichiers modifiés avec 4 ajouts et 2 suppressions
+2
Voir le fichier
@@ -908,6 +908,8 @@ ncclResult_t ncclTopoComputeP2pChannels(struct ncclComm* comm) {
// Doubling P2P channels per peer on single node
if (comm->topo->nodes[GPU].count == comm->topo->nRanks && (IsArchMatch(comm->topo->nodes[GPU].nodes[0].gpu.gcn, "gfx94") || IsArchMatch(comm->topo->nodes[GPU].nodes[0].gpu.gcn, "gfx950"))) comm->p2pnChannelsPerPeer *= 2;
comm->p2pnChannels = std::min(pow2Up(comm->p2pnChannels), 4*CHANNEL_LIMIT);
// p2pnChannelsPerPeer cannot be greater than MAXCHANNELS
comm->p2pnChannelsPerPeer = std::min(comm->p2pnChannelsPerPeer, MAXCHANNELS);
}
// Init channels that weren't used so far