diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArray.cc b/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArray.cc index dc1cf73348..e75e2c6af3 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArray.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArray.cc @@ -191,7 +191,7 @@ TEST_CASE("Unit_hipMemcpy2DToArray_multiDevicePinnedMemPeerGpu") { HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { int canAccessPeer = 0; - hipDeviceCanAccessPeer(&canAccessPeer, 0, 1); + HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); if (canAccessPeer) { HIP_CHECK(hipSetDevice(0)); hipArray *A_d{nullptr}; @@ -248,7 +248,7 @@ TEST_CASE("Unit_hipMemcpy2DToArray_multiDeviceDeviceContextChange") { HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { int canAccessPeer = 0; - hipDeviceCanAccessPeer(&canAccessPeer, 0, 1); + HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); if (canAccessPeer) { HIP_CHECK(hipSetDevice(0)); hipArray *A_d{nullptr}; diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArrayAsync.cc b/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArrayAsync.cc index 5145f28aa1..990b9c651e 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArrayAsync.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpy2DToArrayAsync.cc @@ -216,7 +216,7 @@ TEST_CASE("Unit_hipMemcpy2DToArrayAsync_multiDevicePinnedHostMem") { HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { int canAccessPeer = 0; - hipDeviceCanAccessPeer(&canAccessPeer, 0, 1); + HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); if (canAccessPeer) { HIP_CHECK(hipSetDevice(0)); hipArray *A_d{nullptr}; @@ -278,7 +278,7 @@ TEST_CASE("Unit_hipMemcpy2DToArrayAsync_multiDeviceDeviceContextChange") { HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { int canAccessPeer = 0; - hipDeviceCanAccessPeer(&canAccessPeer, 0, 1); + HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); if (canAccessPeer) { HIP_CHECK(hipSetDevice(0)); hipArray *A_d{nullptr}; diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc b/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc index 1f690fa410..451da3e4fc 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc @@ -109,10 +109,10 @@ void Memcpy3DAsync::AllocateMemory() { */ template void Memcpy3DAsync::DeAllocateMemory() { - hipFreeArray(arr); - hipFreeArray(arr1); + HIP_CHECK(hipFreeArray(arr)); + HIP_CHECK(hipFreeArray(arr1)); free(hData); - hipStreamDestroy(stream); + HIP_CHECK(hipStreamDestroy(stream)); } /* diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpyParam2DAsync.cc b/projects/hip/tests/catch/unit/memory/hipMemcpyParam2DAsync.cc index 7efa2ef909..950082678f 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpyParam2DAsync.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpyParam2DAsync.cc @@ -73,7 +73,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyParam2DAsync_multiDevice-StreamOnDiffDevice", // Initalizing A_d with C_h HIP_CHECK(hipSetDevice(1)); hipStream_t stream; - hipStreamCreate(&stream); + HIP_CHECK(hipStreamCreate(&stream)); HIP_CHECK(hipMemcpy2DAsync(A_d, pitch_A, C_h, width, NUM_W*sizeof(TestType), NUM_H, @@ -143,7 +143,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyParam2DAsync_multiDevice-D2D", size_t pitch_A; size_t width{NUM_W * sizeof(TestType)}; hipStream_t stream; - hipStreamCreate(&stream); + HIP_CHECK(hipStreamCreate(&stream)); HIP_CHECK(hipMallocPitch(reinterpret_cast(&A_d), &pitch_A, width, NUM_H)); HipTest::initArrays(nullptr, nullptr, nullptr, @@ -257,7 +257,7 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyParam2DAsync_multiDevice-H2D-D2H", } else { // Host to Device hip_Memcpy2D desc = {}; - hipStreamCreate(&stream); + HIP_CHECK(hipStreamCreate(&stream)); #ifdef __HIP_PLATFORM_NVCC__ desc.srcMemoryType = CU_MEMORYTYPE_HOST; #else @@ -331,7 +331,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_ExtentValidation") { size_t width{NUM_W * sizeof(char)}; constexpr auto memsetval{100}; hipStream_t stream; - hipStreamCreate(&stream); + HIP_CHECK(hipStreamCreate(&stream)); // Allocating and Initializing the data HIP_CHECK(hipMallocPitch(reinterpret_cast(&A_d), @@ -409,7 +409,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Negative") { size_t width{NUM_W * sizeof(float)}; constexpr auto memsetval{100}; hipStream_t stream; - hipStreamCreate(&stream); + HIP_CHECK(hipStreamCreate(&stream)); // Allocating and Initializing the data HIP_CHECK(hipMallocPitch(reinterpret_cast(&A_d), diff --git a/projects/hip/tests/catch/unit/memory/memset.cc b/projects/hip/tests/catch/unit/memory/memset.cc index 677d8a2d85..91f2d04601 100644 --- a/projects/hip/tests/catch/unit/memory/memset.cc +++ b/projects/hip/tests/catch/unit/memory/memset.cc @@ -6,7 +6,8 @@ TEST_CASE("Unit_hipMemset_4bytes") { REQUIRE(res == hipSuccess); res = hipMemset(d_a, 0, sizeof(int)); REQUIRE(res == hipSuccess); - hipFree(d_a); + res = hipFree(d_a); + REQUIRE(res == hipSuccess); } TEST_CASE("Unit_hipMemset_4bytes_hostMem") { @@ -15,5 +16,6 @@ TEST_CASE("Unit_hipMemset_4bytes_hostMem") { REQUIRE(res == hipSuccess); res = hipMemset(d_a, 0, sizeof(int)); REQUIRE(res == hipSuccess); - hipHostFree(d_a); + res = hipHostFree(d_a); + REQUIRE(res == hipSuccess); }