From 01272807ea46177849fc3806d503d12e397996ee Mon Sep 17 00:00:00 2001 From: jujiang Date: Thu, 19 Mar 2020 15:34:59 -0400 Subject: [PATCH] SWDEV-226708-hipMemcpyPeerAsync failed-->Update test app to create stream on proper device Change-Id: Ia9f51435ffb5a8fbbff39e363acecabb338bf34c --- hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp index d08ff2a7e8..23ac329d64 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpyPeerAsync.cpp @@ -60,16 +60,16 @@ int main() { HIPCHECK(hipDeviceSynchronize()); HipTest::checkVectorADD(A_h, B_h, C_h, N); - HIPCHECK(hipStreamCreate(&s)); HIPCHECK(hipSetDevice(1)); + HIPCHECK(hipStreamCreate(&s)); HIPCHECK(hipMemcpyPeerAsync(X_d, 1, A_d, 0, Nbytes, s)); HIPCHECK(hipMemcpyPeerAsync(Y_d, 1, B_d, 0, Nbytes, s)); hipLaunchKernelGGL(HipTest::vectorADD, dim3(blocks), dim3(threadsPerBlock), 0, 0, static_cast(X_d), static_cast(Y_d), Z_d, N); HIPCHECK(hipMemcpy(C_h, Z_d, Nbytes, hipMemcpyDeviceToHost)); - HIPCHECK(hipDeviceSynchronize()); HIPCHECK(hipStreamSynchronize(s)); + HIPCHECK(hipDeviceSynchronize()); HipTest::checkVectorADD(A_h, B_h, C_h, N); HIPCHECK(hipStreamDestroy(s));