diff --git a/projects/hip-tests/catch/include/memcpy1d_tests_common.hh b/projects/hip-tests/catch/include/memcpy1d_tests_common.hh index fe0d46788b..72c1500fc8 100644 --- a/projects/hip-tests/catch/include/memcpy1d_tests_common.hh +++ b/projects/hip-tests/catch/include/memcpy1d_tests_common.hh @@ -141,7 +141,7 @@ void MemcpyDeviceToDeviceShell(F memcpy_func, const hipStream_t kernel_stream = 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); + return; } HIP_CHECK(hipDeviceEnablePeerAccess(dst_device, 0)); } diff --git a/projects/hip-tests/catch/unit/graph/hipGraphUpload.cc b/projects/hip-tests/catch/unit/graph/hipGraphUpload.cc index d17fb27236..05aac91c8b 100644 --- a/projects/hip-tests/catch/unit/graph/hipGraphUpload.cc +++ b/projects/hip-tests/catch/unit/graph/hipGraphUpload.cc @@ -161,8 +161,17 @@ TEST_CASE("Unit_hipGraphUpload_Functional_multidevice_test") { SECTION("Pass a common stream for all device") { hipStream_t stream; HIP_CHECK(hipStreamCreate(&stream)); - + int currDevice = -1; + HIP_CHECK(hipGetDevice(&currDevice)); for (int i = 0; i < numDevices; i++) { + if (i != currDevice) { + int can_access_peer = 0; + HIP_CHECK(hipDeviceCanAccessPeer(&can_access_peer, currDevice, i)); + if (!can_access_peer) { + INFO("Peer access cannot be enabled between devices " << currDevice << " " << i); + continue; + } + } HIP_CHECK(hipSetDevice(i)); hipGraphUploadFunctional_with_hipStreamBeginCapture(stream); hipGraphUploadFunctional_with_stream(stream);