Skip to content

Commit f2a4898

Browse files
mustafabarnileshnegi
authored andcommitted
Memset to fix inflated performance when GPU is reset (ROCm#94)
* Memset to fix inflated performance when GPU is reset * use hipMemset for both memsets
1 parent 5c41a91 commit f2a4898

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/common.cu‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,8 @@ testResult_t AllocateBuffs(void **sendbuff, size_t sendBytes, void **recvbuff, s
904904
CUDACHECK(cudaMalloc(recvbuff, nbytes));
905905
if (datacheck) CUDACHECK(cudaMalloc(expected, recvBytes));
906906
}
907+
CUDACHECK(hipMemset(*sendbuff, 1, nbytes));
908+
if (datacheck) CUDACHECK(hipMemset(*expected, 1, recvBytes));
907909
return testSuccess;
908910
}
909911

0 commit comments

Comments
 (0)