From cc55343b88291acb2d86fd1aa60d13966ac7e79a Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Wed, 22 Sep 2021 08:43:01 -0700 Subject: [PATCH] Fix divide by zero error [ROCm/rccl-tests commit: dc1ad4853d7ec738387d42a75a58a98d7af00c7b] --- projects/rccl-tests/src/common.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rccl-tests/src/common.cu b/projects/rccl-tests/src/common.cu index 6db2b4328b..4b62741fa3 100644 --- a/projects/rccl-tests/src/common.cu +++ b/projects/rccl-tests/src/common.cu @@ -527,7 +527,7 @@ testResult_t startColl(struct threadArgs* args, ncclDataType_t type, ncclRedOp_t size_t count = args->nbytes / wordSize(type); // Try to change offset for each iteration so that we avoid cache effects and catch race conditions in ptrExchange - size_t totalnbytes = max(args->sendBytes, args->expectedBytes); + size_t totalnbytes = std::max(args->sendBytes, args->expectedBytes); size_t steps = totalnbytes ? args->maxbytes / totalnbytes : 1; size_t shift = totalnbytes * (iter % steps);