From 01b92b5fa8b28c3d748389a5c5ae602c19a158f4 Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Thu, 2 Jul 2026 12:43:35 +0300 Subject: [PATCH 1/8] UCT/GDAKI: check gpunetio header and have_gda config. --- src/uct/api/device/uct_device_impl.h | 9 ++++++--- src/uct/ib/mlx5/gdaki/configure.m4 | 11 +++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/uct/api/device/uct_device_impl.h b/src/uct/api/device/uct_device_impl.h index 310827a243b..5eae91385d5 100644 --- a/src/uct/api/device/uct_device_impl.h +++ b/src/uct/api/device/uct_device_impl.h @@ -12,7 +12,8 @@ #include #include -#if __has_include() && \ +#if defined(HAVE_CONFIG_H) && defined(HAVE_CUDA) && \ + __has_include() && \ __has_include() #include #define UCT_CUDA_IPC_SUPPORTED 1 @@ -20,8 +21,10 @@ #define UCT_CUDA_IPC_SUPPORTED 0 #endif -#if __has_include() && \ - __has_include() +#if defined(HAVE_CONFIG_H) && defined(HAVE_GDA) && \ + __has_include() && \ + __has_include() && \ + __has_include() #include #define UCT_RC_MLX5_GDA_SUPPORTED 1 #else diff --git a/src/uct/ib/mlx5/gdaki/configure.m4 b/src/uct/ib/mlx5/gdaki/configure.m4 index aa00759e214..75c675ed15d 100644 --- a/src/uct/ib/mlx5/gdaki/configure.m4 +++ b/src/uct/ib/mlx5/gdaki/configure.m4 @@ -9,11 +9,18 @@ AC_ARG_WITH([gda], [AS_HELP_STRING([--without-gda], [Disable GDA-KI])], [], [with_gda=yes]) +GDA_GPUNETIO_HEADER="$srcdir/src/uct/ib/mlx5/gdaki/gpunetio/device/doca_gpunetio_dev_verbs_qp.cuh" + AS_IF([test "x$with_gda" = "xyes"] && [test "x$cuda_happy" = "xyes"], - [gda_happy=yes], [gda_happy=no]) + [AS_IF([test -f "$GDA_GPUNETIO_HEADER"], + [gda_happy=yes], + [AC_MSG_WARN([GDA-KI is disabled: gpunetio headers not found at $GDA_GPUNETIO_HEADER. Run 'git submodule update --init external/gpunetio'.]) + gda_happy=no])], + [gda_happy=no]) AS_IF([test "x$gda_happy" = "xyes"], - [uct_ib_mlx5_modules="${uct_ib_mlx5_modules}:gda"]) + [uct_ib_mlx5_modules="${uct_ib_mlx5_modules}:gda" + AC_DEFINE([HAVE_GDA], [1], [Enable GDA-KI support])]) AM_CONDITIONAL([HAVE_GDA], [test "x$gda_happy" != "xno"]) AC_CONFIG_FILES([src/uct/ib/mlx5/gdaki/Makefile From 29cb104ac4f44056488abfbe85a0d8a955399098 Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Thu, 2 Jul 2026 13:43:11 +0300 Subject: [PATCH 2/8] UCT/GDAKI: check gpunetio header and have_gda config. --- src/uct/api/device/uct_device_impl.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/uct/api/device/uct_device_impl.h b/src/uct/api/device/uct_device_impl.h index 5eae91385d5..4f43dad80b3 100644 --- a/src/uct/api/device/uct_device_impl.h +++ b/src/uct/api/device/uct_device_impl.h @@ -13,8 +13,7 @@ #include #if defined(HAVE_CONFIG_H) && defined(HAVE_CUDA) && \ - __has_include() && \ - __has_include() + __has_include() #include #define UCT_CUDA_IPC_SUPPORTED 1 #else @@ -22,9 +21,7 @@ #endif #if defined(HAVE_CONFIG_H) && defined(HAVE_GDA) && \ - __has_include() && \ - __has_include() && \ - __has_include() + __has_include() #include #define UCT_RC_MLX5_GDA_SUPPORTED 1 #else From 304134670a4cb5975c8ce3b74dce422dcc721a4d Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Thu, 2 Jul 2026 13:59:23 +0300 Subject: [PATCH 3/8] UCT/GDAKI: check gpunetio header and have_gda config. --- src/uct/ib/mlx5/gdaki/configure.m4 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/uct/ib/mlx5/gdaki/configure.m4 b/src/uct/ib/mlx5/gdaki/configure.m4 index 75c675ed15d..aa00759e214 100644 --- a/src/uct/ib/mlx5/gdaki/configure.m4 +++ b/src/uct/ib/mlx5/gdaki/configure.m4 @@ -9,18 +9,11 @@ AC_ARG_WITH([gda], [AS_HELP_STRING([--without-gda], [Disable GDA-KI])], [], [with_gda=yes]) -GDA_GPUNETIO_HEADER="$srcdir/src/uct/ib/mlx5/gdaki/gpunetio/device/doca_gpunetio_dev_verbs_qp.cuh" - AS_IF([test "x$with_gda" = "xyes"] && [test "x$cuda_happy" = "xyes"], - [AS_IF([test -f "$GDA_GPUNETIO_HEADER"], - [gda_happy=yes], - [AC_MSG_WARN([GDA-KI is disabled: gpunetio headers not found at $GDA_GPUNETIO_HEADER. Run 'git submodule update --init external/gpunetio'.]) - gda_happy=no])], - [gda_happy=no]) + [gda_happy=yes], [gda_happy=no]) AS_IF([test "x$gda_happy" = "xyes"], - [uct_ib_mlx5_modules="${uct_ib_mlx5_modules}:gda" - AC_DEFINE([HAVE_GDA], [1], [Enable GDA-KI support])]) + [uct_ib_mlx5_modules="${uct_ib_mlx5_modules}:gda"]) AM_CONDITIONAL([HAVE_GDA], [test "x$gda_happy" != "xno"]) AC_CONFIG_FILES([src/uct/ib/mlx5/gdaki/Makefile From 508b1c03d292bf18b40b335cb425c153e82d65ea Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Thu, 2 Jul 2026 14:04:46 +0300 Subject: [PATCH 4/8] UCT/GDAKI: check gpunetio header and have_gda config. --- src/uct/ib/mlx5/gdaki/configure.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uct/ib/mlx5/gdaki/configure.m4 b/src/uct/ib/mlx5/gdaki/configure.m4 index aa00759e214..9d580937274 100644 --- a/src/uct/ib/mlx5/gdaki/configure.m4 +++ b/src/uct/ib/mlx5/gdaki/configure.m4 @@ -13,7 +13,8 @@ AS_IF([test "x$with_gda" = "xyes"] && [test "x$cuda_happy" = "xyes"], [gda_happy=yes], [gda_happy=no]) AS_IF([test "x$gda_happy" = "xyes"], - [uct_ib_mlx5_modules="${uct_ib_mlx5_modules}:gda"]) + [uct_ib_mlx5_modules="${uct_ib_mlx5_modules}:gda" + AC_DEFINE([HAVE_GDA], [1], [Enable GDA-KI support])]) AM_CONDITIONAL([HAVE_GDA], [test "x$gda_happy" != "xno"]) AC_CONFIG_FILES([src/uct/ib/mlx5/gdaki/Makefile From 8f5a21fdef9b15323719ac93f78ac3f6a3295d4c Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Thu, 2 Jul 2026 15:09:11 +0300 Subject: [PATCH 5/8] UCT/GDAKI: check gpunetio header and have_gda config. --- src/uct/api/device/uct_device_impl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uct/api/device/uct_device_impl.h b/src/uct/api/device/uct_device_impl.h index 4f43dad80b3..f4eeddb3105 100644 --- a/src/uct/api/device/uct_device_impl.h +++ b/src/uct/api/device/uct_device_impl.h @@ -12,16 +12,16 @@ #include #include -#if defined(HAVE_CONFIG_H) && defined(HAVE_CUDA) && \ - __has_include() +#if (defined(HAVE_CUDA) || \ + (!defined(HAVE_CONFIG_H) && __has_include() && __has_include())) #include #define UCT_CUDA_IPC_SUPPORTED 1 #else #define UCT_CUDA_IPC_SUPPORTED 0 #endif -#if defined(HAVE_CONFIG_H) && defined(HAVE_GDA) && \ - __has_include() +#if (defined(HAVE_GDA) || \ + (!defined(HAVE_CONFIG_H) && __has_include())) #include #define UCT_RC_MLX5_GDA_SUPPORTED 1 #else From bad1dd662c9ac0ed932c6575ddc06d5e3b3c7efc Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Fri, 3 Jul 2026 16:41:45 +0300 Subject: [PATCH 6/8] UCT/GDAKI: include config.h in gtest. --- test/gtest/ucp/cuda/test_kernels.cu | 4 ++++ test/gtest/uct/cuda/test_kernels.cu | 4 ++++ test/gtest/uct/cuda/test_kernels_uct.cu | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/test/gtest/ucp/cuda/test_kernels.cu b/test/gtest/ucp/cuda/test_kernels.cu index 18a5dc7ff9a..164f4431766 100644 --- a/test/gtest/ucp/cuda/test_kernels.cu +++ b/test/gtest/ucp/cuda/test_kernels.cu @@ -4,6 +4,10 @@ * See file LICENSE for terms. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include "test_kernels.h" #include diff --git a/test/gtest/uct/cuda/test_kernels.cu b/test/gtest/uct/cuda/test_kernels.cu index ca28709880a..36f830b3a7a 100644 --- a/test/gtest/uct/cuda/test_kernels.cu +++ b/test/gtest/uct/cuda/test_kernels.cu @@ -4,6 +4,10 @@ * See file LICENSE for terms. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include "test_kernels.h" #include diff --git a/test/gtest/uct/cuda/test_kernels_uct.cu b/test/gtest/uct/cuda/test_kernels_uct.cu index 4665f5cf5db..023a204b21c 100644 --- a/test/gtest/uct/cuda/test_kernels_uct.cu +++ b/test/gtest/uct/cuda/test_kernels_uct.cu @@ -4,6 +4,10 @@ * See file LICENSE for terms. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include "test_kernels_uct.h" #include From 667a68d0aa3a49af4fddb00cd5c207b627608070 Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Sun, 5 Jul 2026 09:59:25 +0300 Subject: [PATCH 7/8] UCT/GDAKI: check mlx5dv header. --- src/uct/api/device/uct_device_impl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uct/api/device/uct_device_impl.h b/src/uct/api/device/uct_device_impl.h index f4eeddb3105..11991c00de9 100644 --- a/src/uct/api/device/uct_device_impl.h +++ b/src/uct/api/device/uct_device_impl.h @@ -20,8 +20,9 @@ #define UCT_CUDA_IPC_SUPPORTED 0 #endif -#if (defined(HAVE_GDA) || \ - (!defined(HAVE_CONFIG_H) && __has_include())) +#if (defined(HAVE_GDA) || !defined(HAVE_CONFIG_H)) && \ + __has_include() && \ + __has_include() #include #define UCT_RC_MLX5_GDA_SUPPORTED 1 #else From bf8adfa0454e43a1b8815bf59c0bb578076fdd29 Mon Sep 17 00:00:00 2001 From: Ofir Farjon Date: Sun, 5 Jul 2026 10:08:02 +0300 Subject: [PATCH 8/8] UCT/GDAKI: check mlx5dv header. --- src/uct/api/device/uct_device_impl.h | 7 ++++--- src/uct/ib/mlx5/gdaki/configure.m4 | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/uct/api/device/uct_device_impl.h b/src/uct/api/device/uct_device_impl.h index 11991c00de9..b054ab3d83c 100644 --- a/src/uct/api/device/uct_device_impl.h +++ b/src/uct/api/device/uct_device_impl.h @@ -20,9 +20,10 @@ #define UCT_CUDA_IPC_SUPPORTED 0 #endif -#if (defined(HAVE_GDA) || !defined(HAVE_CONFIG_H)) && \ - __has_include() && \ - __has_include() +#if (defined(HAVE_GDA) || \ + (!defined(HAVE_CONFIG_H) && \ + __has_include() && \ + __has_include())) #include #define UCT_RC_MLX5_GDA_SUPPORTED 1 #else diff --git a/src/uct/ib/mlx5/gdaki/configure.m4 b/src/uct/ib/mlx5/gdaki/configure.m4 index 9d580937274..0329a272c33 100644 --- a/src/uct/ib/mlx5/gdaki/configure.m4 +++ b/src/uct/ib/mlx5/gdaki/configure.m4 @@ -9,7 +9,8 @@ AC_ARG_WITH([gda], [AS_HELP_STRING([--without-gda], [Disable GDA-KI])], [], [with_gda=yes]) -AS_IF([test "x$with_gda" = "xyes"] && [test "x$cuda_happy" = "xyes"], +AS_IF([test "x$with_gda" = "xyes"] && [test "x$cuda_happy" = "xyes"] && + [test "x$have_mlx5" = "xyes"], [gda_happy=yes], [gda_happy=no]) AS_IF([test "x$gda_happy" = "xyes"],