From 106e39f1e2db1d245290fc66dc108792289b8493 Mon Sep 17 00:00:00 2001 From: Todd tiantuo Li Date: Wed, 29 May 2024 03:34:05 -0700 Subject: [PATCH] SWDEV-448894 - Correct and align peer access related behavior for memcpy tests Change-Id: I31379836f9066a6b317efc26678302261e4c7a1b [ROCm/hip-tests commit: 4163c69fdc1198863e0e84072fc839dbf8979be1] --- projects/hip-tests/catch/include/memcpy1d_tests_common.hh | 4 +++- .../hip-tests/catch/unit/memory/memcpy2d_tests_common.hh | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/hip-tests/catch/include/memcpy1d_tests_common.hh b/projects/hip-tests/catch/include/memcpy1d_tests_common.hh index ec8f991fa7..7eae09ab8b 100644 --- a/projects/hip-tests/catch/include/memcpy1d_tests_common.hh +++ b/projects/hip-tests/catch/include/memcpy1d_tests_common.hh @@ -141,7 +141,9 @@ void MemcpyDeviceToDeviceShell(F memcpy_func, const hipStream_t kernel_stream = int can_access_peer = 0; HIP_CHECK(hipDeviceCanAccessPeer(&can_access_peer, src_device, dst_device)); if (!can_access_peer) { - INFO("Peer access cannot be enabled between devices " << src_device << " " << dst_device); + std::string msg = "Skipped as peer access cannot be enabled between devices " + + std::to_string(src_device) + " " + std::to_string(dst_device); + HipTest::HIP_SKIP_TEST(msg.c_str()); return; } HIP_CHECK(hipDeviceEnablePeerAccess(dst_device, 0)); diff --git a/projects/hip-tests/catch/unit/memory/memcpy2d_tests_common.hh b/projects/hip-tests/catch/unit/memory/memcpy2d_tests_common.hh index 40e774da68..96f9a16e80 100644 --- a/projects/hip-tests/catch/unit/memory/memcpy2d_tests_common.hh +++ b/projects/hip-tests/catch/unit/memory/memcpy2d_tests_common.hh @@ -81,8 +81,10 @@ void Memcpy2DDeviceToDeviceShell(F memcpy_func, const hipStream_t kernel_stream int can_access_peer = 0; HIP_CHECK(hipDeviceCanAccessPeer(&can_access_peer, src_device, dst_device)); if (!can_access_peer) { - INFO("Peer access cannot be enabled between devices " << src_device << " " << dst_device); - REQUIRE(can_access_peer); + std::string msg = "Skipped as peer access cannot be enabled between devices " + + std::to_string(src_device) + " " + std::to_string(dst_device); + HipTest::HIP_SKIP_TEST(msg.c_str()); + return; } HIP_CHECK(hipDeviceEnablePeerAccess(dst_device, 0)); }