From 13d0ddd12e93d72ce69a083e5811439a3b658f73 Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Wed, 25 Sep 2019 14:07:04 -0700 Subject: [PATCH] Init data for throughput iterations to avoid all zero data --- src/common.cu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common.cu b/src/common.cu index 36f2aa0941..e13aa3521b 100644 --- a/src/common.cu +++ b/src/common.cu @@ -851,6 +851,9 @@ testResult_t run() { HIPCHECK(hipSetDevice(localRank*nThreads*nGpus+i)); AllocateBuffs(sendbuffs+i, sendBytes, recvbuffs+i, recvBytes, expected+i, (size_t)maxBytes, nProcs*nThreads*nGpus); HIPCHECK(hipStreamCreateWithFlags(streams+i, hipStreamNonBlocking)); + // initialize data buffer to avoid all zero data + TESTCHECK(InitData(sendbuffs[i], maxBytes, ncclUint8, 0, i)); + HIPCHECK(hipDeviceSynchronize()); } //if parallel init is not selected, use main thread to initialize NCCL