From 856d4b5075a3042f57c928992aca8a23f1cc736e Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Thu, 25 May 2023 06:14:22 +0530 Subject: [PATCH] SWDEV-399104 - Fix hipMemcpy2DAsync_PinnedMemory.tst (#3231) failure - As per spec, hipMemset2D is async with respect to host when target memory is device memory - Hence need to call hipDeviceSynchronize before changing device Change-Id: I58e6efc9466233d80b8ba2c58c0c691c68827128 --- tests/src/runtimeApi/memory/hipMemcpy2DAsync.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/src/runtimeApi/memory/hipMemcpy2DAsync.cpp b/tests/src/runtimeApi/memory/hipMemcpy2DAsync.cpp index 3d338e670c..a22089f363 100644 --- a/tests/src/runtimeApi/memory/hipMemcpy2DAsync.cpp +++ b/tests/src/runtimeApi/memory/hipMemcpy2DAsync.cpp @@ -174,6 +174,7 @@ bool Memcpy2DAsync::Memcpy2DAsync_PinnedMemory_MultiGPU() { HIPCHECK(hipHostMalloc(reinterpret_cast(&D_h), sizeElements)); AllocateMemory(); HIPCHECK(hipMemset2D(A_d, pitch_A, memsetval, NUM_W, NUM_H)); + HIPCHECK(hipDeviceSynchronize()); HIPCHECK(hipSetDevice(1)); hipStream_t p_stream; HIPCHECK(hipStreamCreate(&p_stream));