SWDEV-448894 - Correct and align peer access related behavior for memcpy tests

Change-Id: I31379836f9066a6b317efc26678302261e4c7a1b


[ROCm/hip-tests commit: 4163c69fdc]
This commit is contained in:
Todd tiantuo Li
2024-05-29 03:34:05 -07:00
szülő 4603679848
commit 106e39f1e2
2 fájl változott, egészen pontosan 7 új sor hozzáadva és 3 régi sor törölve
@@ -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));
@@ -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));
}