Introduce multi-rank support per device.

This is a single commit of the source code changes required to
introduce support for multiple ranks per device.
A new interface (ncclCommRankInitMulti) has to be used to make use of
this new feature.
This commit is contained in:
Edgar
2022-03-14 14:55:24 -04:00
committato da Edgar Gabriel
parent 5cb2aca3d9
commit 0336ffdf70
23 ha cambiato i file con 1232 aggiunte e 87 eliminazioni
+4 -4
Vedi File
@@ -69,7 +69,7 @@ public:
int rankToCudaDev(int rank) {
for (int i=0; i<getNumGpus(); i++) {
if (rank == systems[0]->nodes[GPU].nodes[i].gpu.rank)
if (rank == systems[0]->nodes[GPU].nodes[i].gpu.rank[0])
return systems[0]->nodes[GPU].nodes[i].gpu.dev;
}
return -1;
@@ -77,7 +77,7 @@ public:
int64_t getGpuBusId(int rank) {
for (int i=0; i<getNumGpus(); i++) {
if (rank == systems[0]->nodes[GPU].nodes[i].gpu.rank)
if (rank == systems[0]->nodes[GPU].nodes[i].gpu.rank[0])
return systems[0]->nodes[GPU].nodes[i].id;
}
return -1;
@@ -93,7 +93,7 @@ public:
void setRanks() {
for (int r=0; r<getNumGpus(); r++)
for (int i=0; i<getNumGpus(); i++)
systems[r]->nodes[GPU].nodes[i].gpu.rank += firstRank;
systems[r]->nodes[GPU].nodes[i].gpu.rank[0] += firstRank;
}
int p2pCanConnect(int device1, int device2) { return 1; }
@@ -133,4 +133,4 @@ public:
NetworkModel() : nRanks(0) {}
};
#endif
#endif