From 7a9ebee08abfcffd720d6f4190b8c28ccad492b0 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Sat, 2 Mar 2019 23:38:37 +0530 Subject: [PATCH] Fix review comments [ROCm/hip commit: 131c0ea3261a1db3c6031ecb2394d59f644c6770] --- .../tests/src/runtimeApi/memory/hipMemset.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/projects/hip/tests/src/runtimeApi/memory/hipMemset.cpp b/projects/hip/tests/src/runtimeApi/memory/hipMemset.cpp index 5c8b1a18c1..bcb0adbeef 100644 --- a/projects/hip/tests/src/runtimeApi/memory/hipMemset.cpp +++ b/projects/hip/tests/src/runtimeApi/memory/hipMemset.cpp @@ -57,7 +57,7 @@ bool testhipMemset(int memsetval,int p_gpuDevice) break; } } - hipFree(A_d); + HIPCHECK(hipFree(A_d)); free(A_h); return testResult; } @@ -75,6 +75,7 @@ bool testhipMemsetAsync(int memsetval,int p_gpuDevice) hipStream_t stream; HIPCHECK(hipStreamCreate(&stream)); HIPCHECK ( hipMemsetAsync(A_d, memsetval, Nbytes, stream )); + HIPCHECK ( hipStreamSynchronize(stream)); HIPCHECK ( hipMemcpy(A_h, (void*)A_d, Nbytes, hipMemcpyDeviceToHost)); for (int i=0; i