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.
Bu işleme şunda yer alıyor:
Edgar
2022-03-14 14:55:24 -04:00
işlemeyi yapan: Edgar Gabriel
ebeveyn 5cb2aca3d9
işleme 0336ffdf70
23 değiştirilmiş dosya ile 1232 ekleme ve 87 silme
+4 -4
Dosyayı Görüntüle
@@ -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