From edefd097530caae81d9b1dd3c7291533e4fe81c9 Mon Sep 17 00:00:00 2001 From: "GunaShekar, Ajay" Date: Wed, 14 May 2025 20:49:01 +0530 Subject: [PATCH] SWDEV-527806 - hip-tests . Add P2P checks for mGPU atomics tests (#168) [ROCm/hip-tests commit: 86eb49aa7fec62b467121a10382a5549ed82d2d8] --- .../hip-tests/catch/unit/atomics/bitwise_common.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/hip-tests/catch/unit/atomics/bitwise_common.hh b/projects/hip-tests/catch/unit/atomics/bitwise_common.hh index 021bce3f9b..cabbdaf13a 100644 --- a/projects/hip-tests/catch/unit/atomics/bitwise_common.hh +++ b/projects/hip-tests/catch/unit/atomics/bitwise_common.hh @@ -393,6 +393,17 @@ void MultipleDeviceMultipleKernelTest(const unsigned int num_devices, if (kernel_count > 1) { for (auto i = 0u; i < num_devices; ++i) { + int canAccess = 0; + for (auto j = 0u; j < num_devices; ++j) { + if (i != j) { + HIP_CHECK(hipDeviceCanAccessPeer(&canAccess, i, j)); + if(canAccess == 0) { + std::string msg = "P2P access check failed between dev1:" + std::to_string(i) + ",dev2:" + std::to_string(j); + HipTest::HIP_SKIP_TEST(msg.c_str()); + return; + } + } + } int concurrent_kernels = 0; HIP_CHECK(hipDeviceGetAttribute(&concurrent_kernels, hipDeviceAttributeConcurrentKernels, i)); if (!concurrent_kernels) {