From 21afd4320e0e5f28762f3921f959b5d3b9ad7db8 Mon Sep 17 00:00:00 2001 From: 0z5a Date: Mon, 19 Oct 2026 18:13:06 +0200 Subject: [PATCH] transport/common: use the CMake-defined x86_64 macro for host barriers transport_common.h selects its x86 barriers with NVSHMEM_x86_64, but CMake defines NVSHMEM_X86_64 (src/CMakeLists.txt, src/modules/transport/CMakeLists.txt.in, src/device/CMakeLists.txt), and nothing defines the lowercase name. On x86_64, MEM_BARRIER(), STORE_BARRIER() and LOAD_BARRIER() therefore fall through to the generic compiler-only barrier, so the STORE_BARRIER() calls before the ibdevx, ibrc, staged, gpunetio and libfabric doorbell and flag writes never emit sfence. Use the macro that CMake defines, as the other x86 checks in the transports already do. Co-Authored-By: Claude Opus 5.5 Signed-off-by: 0z5a --- src/modules/transport/common/transport_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/transport/common/transport_common.h b/src/modules/transport/common/transport_common.h index 30d6eabd..c5d49bb1 100644 --- a/src/modules/transport/common/transport_common.h +++ b/src/modules/transport/common/transport_common.h @@ -30,7 +30,7 @@ #define TRANSPORT_LOG_ABORT 4 #define TRANSPORT_LOG_TRACE 5 -#if defined(NVSHMEM_x86_64) +#if defined(NVSHMEM_X86_64) #define MEM_BARRIER() asm volatile("mfence" ::: "memory") #define STORE_BARRIER() asm volatile("sfence" ::: "memory") #define LOAD_BARRIER() asm volatile("lfence" ::: "memory")