move to a2a api (#9)
This commit is contained in:
+1
-16
@@ -60,23 +60,8 @@ void AlltoAllGetBw(size_t count, int typesize, double sec, double* algBw, double
|
|||||||
}
|
}
|
||||||
|
|
||||||
testResult_t AlltoAllRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDataType_t type, ncclRedOp_t op, int root, ncclComm_t comm, hipStream_t stream) {
|
testResult_t AlltoAllRunColl(void* sendbuff, void* recvbuff, size_t count, ncclDataType_t type, ncclRedOp_t op, int root, ncclComm_t comm, hipStream_t stream) {
|
||||||
int nRanks;
|
NCCLCHECK(ncclAllToAll(sendbuff, recvbuff, count, type, comm, stream));
|
||||||
NCCLCHECK(ncclCommCount(comm, &nRanks));
|
|
||||||
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;
|
return testSuccess;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct testColl alltoAllTest = {
|
struct testColl alltoAllTest = {
|
||||||
|
|||||||
مرجع در شماره جدید
Block a user