diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpyPeer.cc b/projects/hip/tests/catch/unit/memory/hipMemcpyPeer.cc index 48e881895d..33ee2e9f70 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpyPeer.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpyPeer.cc @@ -73,11 +73,13 @@ TEST_CASE("Unit_hipMemcpyPeer_Negative") { } SECTION("Passing invalid Destination device ID") { - REQUIRE(hipMemcpyPeer(B_d, 10, A_d, 0, copy_bytes) != hipSuccess); + REQUIRE(hipMemcpyPeer(B_d, numDevices, A_d, 0, copy_bytes) != + hipSuccess); } SECTION("Passing invalid Source device ID") { - REQUIRE(hipMemcpyPeer(B_d, 1, A_d, 10, copy_bytes) != hipSuccess); + REQUIRE(hipMemcpyPeer(B_d, 1, A_d, numDevices, copy_bytes) != + hipSuccess); } HipTest::freeArrays(A_d, B_d, nullptr, A_h, B_h, nullptr, false); } else { diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpyPeerAsync.cc b/projects/hip/tests/catch/unit/memory/hipMemcpyPeerAsync.cc index 56a76cbad2..159c8309e3 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpyPeerAsync.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpyPeerAsync.cc @@ -82,12 +82,12 @@ TEST_CASE("Unit_hipMemcpyPeerAsync_Negative") { } SECTION("Passing invalid Destination device ID") { - REQUIRE(hipMemcpyPeerAsync(B_d, 10, A_d, 0, copy_bytes, + REQUIRE(hipMemcpyPeerAsync(B_d, numDevices, A_d, 0, copy_bytes, stream) != hipSuccess); } SECTION("Passing invalid Source device ID") { - REQUIRE(hipMemcpyPeerAsync(B_d, 10, A_d, 0, copy_bytes, + REQUIRE(hipMemcpyPeerAsync(B_d, 0, A_d, numDevices, copy_bytes, stream) != hipSuccess); } @@ -155,14 +155,14 @@ TEST_CASE("Unit_hipMemcpyPeerAsync_Basic") { stream)); HIP_CHECK(hipMemcpyPeerAsync(Y_d, 1, B_d, 0, copy_bytes, stream)); - HIP_CHECK(hipStreamSynchronize(stream)); + HIP_CHECK(hipStreamSynchronize(stream)); } SECTION("Calling hipMemcpyPerAsync() using hipStreamPerThread") { HIP_CHECK(hipMemcpyPeerAsync(X_d, 1, A_d, 0, copy_bytes, hipStreamPerThread)); HIP_CHECK(hipMemcpyPeerAsync(Y_d, 1, B_d, 0, copy_bytes, hipStreamPerThread)); - HIP_CHECK(hipStreamSynchronize(hipStreamPerThread)); + HIP_CHECK(hipStreamSynchronize(hipStreamPerThread)); } hipLaunchKernelGGL(HipTest::vectorADD, dim3(1), dim3(1), 0, 0, static_cast(X_d),