Change scatter and gather bandwidth calculation to match alltoall (#7)

[ROCm/rccl-tests commit: 346cb16442]
This commit is contained in:
Wenkai Du
2020-07-06 17:12:50 -07:00
zatwierdzone przez GitHub
rodzic 075041a9fa
commit 99d8ddc145
2 zmienionych plików z 14 dodań i 8 usunięć
+7 -4
Wyświetl plik
@@ -64,10 +64,10 @@ testResult_t GatherInitData(struct threadArgs* args, ncclDataType_t type, ncclRe
}
void GatherGetBw(size_t count, int typesize, double sec, double* algBw, double* busBw, int nranks) {
double baseBw = (double)(count * typesize * (nranks - 1)) / 1.0E9 / sec;
double baseBw = (double)(count * typesize) / 1.0E9 / sec;
*algBw = baseBw;
double factor = 1;
double factor = ((double)(nranks-1))/((double)(nranks));
*busBw = baseBw * factor;
}
@@ -79,7 +79,10 @@ testResult_t GatherRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDat
int rank;
NCCLCHECK(ncclCommUserRank(comm, &rank));
#if NCCL_MAJOR >= 2 && NCCL_MINOR >= 7
#if NCCL_MAJOR < 2 || NCCL_MINOR < 7
printf("NCCL 2.7 or later is needed for gather. This test was compiled with %d.%d.\n", NCCL_MAJOR, NCCL_MINOR);
return testNcclError;
#else
#if defined(RCCL_GATHER_SCATTER) && defined(USE_RCCL_GATHER_SCATTER)
if (rank == root)
NCCLCHECK(ncclGather(sendbuff, recvbuff, count, type, root, comm, stream));
@@ -93,9 +96,9 @@ testResult_t GatherRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDat
}
NCCLCHECK(ncclSend(sendbuff, count, type, root, comm, stream));
NCCLCHECK(ncclGroupEnd());
#endif
#endif
return testSuccess;
#endif
}
struct testColl gatherTest = {
+7 -4
Wyświetl plik
@@ -66,10 +66,10 @@ testResult_t ScatterInitData(struct threadArgs* args, ncclDataType_t type, ncclR
}
void ScatterGetBw(size_t count, int typesize, double sec, double* algBw, double* busBw, int nranks) {
double baseBw = (double)(count * typesize * (nranks - 1)) / 1.0E9 / sec;
double baseBw = (double)(count * typesize) / 1.0E9 / sec;
*algBw = baseBw;
double factor = 1;
double factor = ((double)(nranks-1))/((double)(nranks));
*busBw = baseBw * factor;
}
@@ -81,7 +81,10 @@ testResult_t ScatterRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDa
int rank;
NCCLCHECK(ncclCommUserRank(comm, &rank));
#if NCCL_MAJOR >= 2 && NCCL_MINOR >= 7
#if NCCL_MAJOR < 2 || NCCL_MINOR < 7
printf("NCCL 2.7 or later is needed for scatter. This test was compiled with %d.%d.\n", NCCL_MAJOR, NCCL_MINOR);
return testNcclError;
#else
#if defined(RCCL_GATHER_SCATTER) && defined(USE_RCCL_GATHER_SCATTER)
NCCLCHECK(ncclScatter(sendbuff, recvbuff, count, type, root, comm, stream));
#else
@@ -92,9 +95,9 @@ testResult_t ScatterRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDa
}
NCCLCHECK(ncclRecv(recvbuff, count, type, root, comm, stream));
NCCLCHECK(ncclGroupEnd());
#endif
#endif
return testSuccess;
#endif
}
struct testColl scatterTest = {