SWDEV-1 - Add missing checks in hipMemcpy.cc

[ROCm/hip commit: 4a745feb5f]
此提交包含在:
Maneesh Gupta
2022-10-11 10:50:43 +05:30
提交者 GitHub
父節點 e6b27bb952
當前提交 1a250f3fe8
+5 -5
查看文件
@@ -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 "
<<device << std::endl;
HipTest::initArrays<TestType>(&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<const TestType*>(X_d),