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));