Fix #47 : compilation error on NCCL<2.7

Return an error when trying to run alltoall test when compiled
against NCCL<2.7.


[ROCm/rccl-tests commit: 07ac716c1a]
This commit is contained in:
Sylvain Jeaugey
2020-06-18 15:00:05 -07:00
parent cf70df2498
commit fcaaf2c4a1
+5 -1
View File
@@ -64,14 +64,18 @@ testResult_t AlltoAllRunColl(void* sendbuff, void* recvbuff, size_t count, ncclD
size_t rankOffset = count * wordSize(type);
if (count == 0) return testSuccess;
#if NCCL_MAJOR < 2 || NCCL_MINOR < 7
printf("NCCL 2.7 or later is needed for alltoall. This test was compiled with %d.%d.\n", NCCL_MAJOR, NCCL_MINOR);
return testNcclError;
#else
NCCLCHECK(ncclGroupStart());
for (int r=0; r<nRanks; r++) {
NCCLCHECK(ncclSend(((char*)sendbuff)+r*rankOffset, count, type, r, comm, stream));
NCCLCHECK(ncclRecv(((char*)recvbuff)+r*rankOffset, count, type, r, comm, stream));
}
NCCLCHECK(ncclGroupEnd());
return testSuccess;
#endif
}
struct testColl alltoAllTest = {