Skip to content

Commit 940c1c1

Browse files
authored
UCT/GGA: Add option to disable gga - 1.21.x (#11519)
UCT: Add option to disable gga (#11507) * UCT/IB/MLX5: Add option to disable GGA transport Add a --with-gga/--without-gga configure option to control building the GGA (DPU) MLX5 transport, and gate gga/gga_mlx5.c on a new HAVE_TL_GGA conditional instead of HAVE_MLX5_MMO. Also add the author to AUTHORS. * UCT/IB/MLX5: Address review on GGA configure option * UCT/IB/MLX5: Change with_gga checking location --------- (cherry picked from commit 10de7c0) Signed-off-by: Zhenlong Ma <zhenlongm@nvidia.com>
1 parent ca89dce commit 940c1c1

5 files changed

Lines changed: 42 additions & 2 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Yihua Xu <yihua.xu@intel.com>
125125
Yiltan Hassan Temucin <yiltan.temucin@amd.com>
126126
Yossi Itigin <yosefe@nvidia.com>
127127
Yuriy Shestakov <yuriis@mellanox.com>
128+
Zhenlong Ma <zhenlongm@nvidia.com>
128129
Zhongkai Zhang <zhzhang@habana.ai>
129130
Zhu Yanjun <yanjunz@mellanox.com>
130131
Zihao Zhao <zizhao@nvidia.com>

buildlib/tools/builds.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,13 @@ build_no_devx() {
321321
build_gcc --with-devx=no
322322
}
323323

324+
build_no_gga() {
325+
echo "==== Build without GGA transport ===="
326+
${WORKSPACE}/contrib/configure-devel --prefix=$ucx_inst --without-gga --disable-gtest
327+
$MAKEP
328+
check_no_gga
329+
}
330+
324331
build_no_openmp() {
325332
build_gcc --disable-openmp
326333
}
@@ -448,6 +455,13 @@ build_no_gda() {
448455
fi
449456
}
450457

458+
check_no_gga() {
459+
if [ -f ${ucx_build_dir}/src/uct/ib/mlx5/gga/.libs/libuct_ib_mlx5_la-gga_mlx5.o ] ; then
460+
azure_log_error "build --without-gga created GGA object"
461+
exit 1
462+
fi
463+
}
464+
451465
az_init_modules
452466
prepare_build
453467

@@ -470,6 +484,7 @@ then
470484
'build_pgi' \
471485
'build_gcc' \
472486
'build_no_devx' \
487+
'build_no_gga' \
473488
'build_no_openmp' \
474489
'build_gcc_debug_opt' \
475490
'build_gcc_with_dndebug' \

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ AS_IF([test "x$with_docs_only" = xyes],
193193
AM_CONDITIONAL([HAVE_TL_DC], [false])
194194
AM_CONDITIONAL([HAVE_DC_DV], [false])
195195
AM_CONDITIONAL([HAVE_TL_UD], [false])
196+
AM_CONDITIONAL([HAVE_TL_GGA], [false])
196197
AM_CONDITIONAL([HAVE_CRAY_UGNI], [false])
197198
AM_CONDITIONAL([HAVE_CUDA], [false])
198199
AM_CONDITIONAL([HAVE_CUDA_STATIC], [false])

src/uct/ib/configure.m4

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ AC_ARG_WITH([dc],
5757
[],
5858
[with_dc=yes])
5959

60+
#
61+
# GGA Support
62+
#
63+
AC_ARG_WITH([gga],
64+
[AS_HELP_STRING([--with-gga], [Compile with GGA DPU transport support])],
65+
[],
66+
[with_gga=guess])
67+
6068

6169
#
6270
# TM (IB Tag Matching) Support
@@ -205,6 +213,16 @@ AS_IF([test "x$with_ib" = "xyes"],
205213
AS_IF([test x$with_devx = xyes -a x$have_devx != xyes], [
206214
AC_MSG_ERROR([devx requested but not found])])
207215
216+
AS_IF([test "x$with_gga" != xno], [
217+
AS_IF([test "x$have_mlx5" = xyes -a "x$has_mlx5_mmo" = xyes -a "x$have_devx" = xyes -a "x$with_rc" != xno],
218+
[have_gga=yes
219+
AC_DEFINE([HAVE_TL_GGA], 1, [GGA transport support])],
220+
[AS_IF([test "x$with_gga" = xyes],
221+
[AC_MSG_ERROR([GGA requested but MLX5, MLX5 MMO, DEVX, or RC support is not available])])
222+
have_gga=no])
223+
],
224+
[have_gga=no])
225+
208226
AC_CHECK_DECLS([IBV_LINK_LAYER_INFINIBAND,
209227
IBV_LINK_LAYER_ETHERNET,
210228
IBV_EVENT_GID_CHANGE,
@@ -335,9 +353,13 @@ AS_IF([test "x$with_ib" = "xyes"],
335353
uct_modules="${uct_modules}:ib"
336354
],
337355
[
356+
AS_IF([test "x$with_gga" = xyes],
357+
[AC_MSG_ERROR([GGA requested but IB/verbs support is not available])])
338358
with_dc=no
339359
with_rc=no
340360
with_ud=no
361+
with_gga=no
362+
have_gga=no
341363
with_mlx5=no
342364
])
343365

@@ -351,6 +373,7 @@ AM_CONDITIONAL([HAVE_TL_DC], [test "x$with_dc" != xno])
351373
AM_CONDITIONAL([HAVE_DC_DV], [test -n "$have_dc_dv"])
352374
AM_CONDITIONAL([HAVE_TL_UD], [test "x$with_ud" != xno])
353375
AM_CONDITIONAL([HAVE_DEVX], [test -n "$have_devx"])
376+
AM_CONDITIONAL([HAVE_TL_GGA], [test "x$have_gga" = xyes])
354377
AM_CONDITIONAL([HAVE_MLX5_HW_UD], [test "x$have_mlx5" = xyes -a "x$has_get_av" != xno])
355378
AM_CONDITIONAL([HAVE_MLX5_MMO], [test -n "$has_mlx5_mmo"])
356379

src/uct/ib/mlx5/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ if HAVE_DEVX
4343
libuct_ib_mlx5_la_SOURCES += \
4444
rc/rc_mlx5_devx.c
4545

46-
if HAVE_MLX5_MMO
46+
if HAVE_TL_GGA
4747
libuct_ib_mlx5_la_SOURCES += \
4848
gga/gga_mlx5.c
49-
endif # HAVE_MLX5_MMO
49+
endif # HAVE_TL_GGA
5050
endif # HAVE_DEVX
5151

5252
endif # HAVE_TL_RC

0 commit comments

Comments
 (0)