Add Rome model and improve search (#305)

[ROCm/rccl commit: 975b14dffa]
This commit is contained in:
Wenkai Du
2020-11-17 14:55:06 -08:00
committed by GitHub
parent 32fdfc93fc
commit b68ff1ebba
5 changed files with 123 additions and 2 deletions
+3 -1
View File
@@ -973,8 +973,10 @@ static bool permuteGpuIds(int *g, int n, int last, struct rcclRomeModel* ref, st
if (i < ref->nGpus) return false;
// match XGMI connection
for (i = 0; i < ref->nGpus; i++) {
for (j = 0; j < ref->nGpus; j++)
for (j = 0; j < ref->nGpus; j++) {
if (ref->connMatrix[i*ref->nGpus+j] != topo->connMatrix[g[i]*ref->nGpus+g[j]]) break;
if ((ref->gpuIds[i]-ref->gpuIds[j])*(topo->gpuIds[g[i]]-topo->gpuIds[g[j]]) < 0) break;
}
if (j < ref->nGpus) break;
}
if (i < ref->nGpus) return false;