From e5f1482efb91c1e0d505ec9b61070dc9f5b60e28 Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Mon, 4 Jan 2021 16:51:16 -0500 Subject: [PATCH] Add tests code that can print info and reset input/output buffers --- src/common.cu | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common.cu b/src/common.cu index 401ba46c2b..6363899965 100644 --- a/src/common.cu +++ b/src/common.cu @@ -659,6 +659,11 @@ testResult_t AllocateBuffs(void **sendbuff, size_t sendBytes, void **recvbuff, s HIPCHECK(hipMallocManaged(sendbuff, nbytes)); HIPCHECK(hipMallocManaged(recvbuff, nbytes)); HIPCHECK(hipMallocManaged(expected, recvBytes)); +#if 0 + HIPCHECK(hipMemset(*sendbuff, 0, nbytes)); + HIPCHECK(hipMemset(*recvbuff, 0, nbytes)); + HIPCHECK(hipMemset(*expected, 0, recvBytes)); +#endif } else { HIPCHECK(hipMalloc(sendbuff, nbytes)); @@ -910,6 +915,7 @@ testResult_t run() { for (int i=0; i