From 3568e0df02c7f8d203de29b9e175ac87f7da337f Mon Sep 17 00:00:00 2001 From: Julia Jiang <56359287+jujiang-del@users.noreply.github.com> Date: Mon, 5 Jan 2026 12:35:41 -0500 Subject: [PATCH] SWDEV-563487 - Fix catch tests failures on Windows (#2097) --- projects/hip-tests/catch/unit/memory/hipMemcpyDtoD.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpyDtoD.cc b/projects/hip-tests/catch/unit/memory/hipMemcpyDtoD.cc index 77e94d1cff..7f93fff4f1 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpyDtoD.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpyDtoD.cc @@ -50,11 +50,12 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyDtoD_Basic", "[multigpu]", int, float, int canAccessPeer = 0; HIP_CHECK(hipDeviceCanAccessPeer(&canAccessPeer, 0, 1)); HIP_CHECK(hipSetDevice(0)); - if (canAccessPeer) { - HIP_CHECK(hipDeviceEnablePeerAccess(1, 0)); - } else { - INFO("Machine does not have P2P Capabilities"); + if (!canAccessPeer) { + std::string msg = "Device is not capable of directly accessing memory from peerDevice. Skipping the test."; + HipTest::HIP_SKIP_TEST(msg.c_str()); + return; } + HIP_CHECK(hipDeviceEnablePeerAccess(1, 0)); HipTest::initArrays(&A_d, &B_d, &C_d, &A_h, &B_h, &C_h, NUM_ELM, false); HIP_CHECK(hipSetDevice(1)); HIP_CHECK(hipMalloc(&X_d, Nbytes)); @@ -90,9 +91,9 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpyDtoD_Basic", "[multigpu]", int, float, HipTest::checkVectorADD(A_h, B_h, C_h, NUM_ELM); } - HipTest::freeArrays(A_d, B_d, C_d, A_h, B_h, C_h, false); HIP_CHECK(hipFree(X_d)); HIP_CHECK(hipFree(Y_d)); HIP_CHECK(hipFree(Z_d)); } + HipTest::freeArrays(A_d, B_d, C_d, A_h, B_h, C_h, false); }