From 1a250f3fe8ded269420bad07bf553c5cb1bf8a31 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 11 Oct 2022 10:50:43 +0530 Subject: [PATCH] SWDEV-1 - Add missing checks in hipMemcpy.cc [ROCm/hip commit: 4a745feb5f295e3afc48143dc3f722e2860669b6] --- projects/hip/tests/catch/unit/memory/hipMemcpy.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpy.cc b/projects/hip/tests/catch/unit/memory/hipMemcpy.cc index 20860d2843..84af63bea0 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpy.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpy.cc @@ -576,7 +576,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpy_PinnedRegMemWithKernelLaunch", HIP_CHECK(hipSetDevice(HipTest::RAND_R(&seed) % (numDevices-1)+1)); int device; - hipGetDevice(&device); + HIP_CHECK(hipGetDevice(&device)); std::cout <<"hipMemcpy is set to happen between device 0 and device " <(&X_d, &Y_d, &Z_d, nullptr, @@ -588,10 +588,10 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpy_PinnedRegMemWithKernelLaunch", C_h[j] = 0; } - hipMemcpy(A_h, A_d, Nbytes, hipMemcpyDeviceToHost); - hipMemcpy(X_d, A_h, Nbytes, hipMemcpyHostToDevice); - hipMemcpy(B_h, B_d, Nbytes, hipMemcpyDeviceToHost); - hipMemcpy(Y_d, B_h, Nbytes, hipMemcpyHostToDevice); + HIP_CHECK(hipMemcpy(A_h, A_d, Nbytes, hipMemcpyDeviceToHost)); + HIP_CHECK(hipMemcpy(X_d, A_h, Nbytes, hipMemcpyHostToDevice)); + HIP_CHECK(hipMemcpy(B_h, B_d, Nbytes, hipMemcpyDeviceToHost)); + HIP_CHECK(hipMemcpy(Y_d, B_h, Nbytes, hipMemcpyHostToDevice)); hipLaunchKernelGGL(HipTest::vectorADD, dim3(blocks), dim3(threadsPerBlock), 0, 0, static_cast(X_d),