From c6051f388003f8d9fa60b43fced1475ad5d099af Mon Sep 17 00:00:00 2001 From: Vico Chu Date: Fri, 9 May 2025 17:12:07 +0800 Subject: [PATCH] Feat: enhance nvidia peer memory detection --- third-party/nvshmem.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/third-party/nvshmem.patch b/third-party/nvshmem.patch index 55ad779..ef01838 100644 --- a/third-party/nvshmem.patch +++ b/third-party/nvshmem.patch @@ -421,3 +421,17 @@ index ea1e284..e6640d6 100644 -- 2.25.1 +diff --git a/src/modules/transport/common/transport_ib_common.cpp b/src/modules/transport/common/transport_ib_common.cpp +index c89f408..f99018a 100644 +--- a/src/modules/transport/common/transport_ib_common.cpp ++++ b/src/modules/transport/common/transport_ib_common.cpp +@@ -26,6 +26,9 @@ int nvshmemt_ib_common_nv_peer_mem_available() { + if (access("/sys/kernel/mm/memory_peers/nvidia-peermem/version", F_OK) == 0) { + return NVSHMEMX_SUCCESS; + } ++ if (access("/sys/module/nvidia_peermem/version", F_OK) == 0) { ++ return NVSHMEMX_SUCCESS; ++ } + + return NVSHMEMX_ERROR_INTERNAL; + }