Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ go.work
go.work.sum
bindings/go/pkg/
bindings/go/go.sum
*.d
37 changes: 35 additions & 2 deletions config/m4/compiler.m4
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,34 @@ AC_ARG_ENABLE([gcov],
[enable_gcov=no])
AM_CONDITIONAL([HAVE_GCOV],[test "x$enable_gcov" = xyes])

#
# Enable NVCC build
#
AC_ARG_WITH([nvcc],
AS_HELP_STRING([--with-nvcc], [Enable NVCC compiler support]))

AS_IF([test "x$with_nvcc" != "xno"],
[
# Look for NVCC compiler
AC_PATH_PROG([NVCC], [nvcc], [no])
AS_IF([test "x$NVCC" != "xno"],
[
AC_DEFINE([HAVE_NVCC], [1], [Enable NVCC compiler support])
NVCC_FLAGS="-g -lineinfo"
AS_IF([test "x$enable_debug" = xyes],
[NVCC_FLAGS="$NVCC_FLAGS -G"])
AC_DEFINE_UNQUOTED([NVCC_PATH], ["$NVCC"], [Path to NVCC compiler])
AC_DEFINE_UNQUOTED([NVCC_FLAGS], ["$NVCC_FLAGS"], [NVCC compiler flags])
nvcc_happy=yes
],
[
nvcc_happy=no
AS_IF([test "x$with_nvcc" = "xyes"],
[AC_MSG_ERROR([NVCC compiler support requested but nvcc not found])])
])
])
AM_CONDITIONAL([HAVE_NVCC], [test "x$NVCC" != "xno"])


#
# Optimization level
Expand All @@ -71,9 +99,11 @@ AS_IF([test "x$enable_compiler_opt" = "xyes"], [BASE_CFLAGS="-O3 $BASE_CFLAGS"],
[test "x$enable_compiler_opt" = "xnone"],
[AS_IF([test "x$enable_debug" = xyes -o "x$enable_gcov" = xyes],
[BASE_CFLAGS="-O0 $BASE_CFLAGS"
BASE_CXXFLAGS="-O0 $BASE_CXXFLAGS"],
BASE_CXXFLAGS="-O0 $BASE_CXXFLAGS"
NVCC_FLAGS="-O0 $NVCC_FLAGS"],
[BASE_CFLAGS="-O3 $BASE_CFLAGS"
BASE_CXXFLAGS="-O0 $BASE_CXXFLAGS"])],
BASE_CXXFLAGS="-O0 $BASE_CXXFLAGS"
NVCC_FLAGS="-O3 $NVCC_FLAGS"])],
[test "x$enable_compiler_opt" = "xno"], [],
[BASE_CFLAGS="-O$enable_compiler_opt $BASE_CFLAGS"])

Expand Down Expand Up @@ -633,4 +663,7 @@ BASE_CPPFLAGS="-DCPU_FLAGS=\"$OPT_CFLAGS\""
BASE_CPPFLAGS="$BASE_CPPFLAGS -I\${abs_top_srcdir}/src"
BASE_CPPFLAGS="$BASE_CPPFLAGS -I\${abs_top_builddir}"
BASE_CPPFLAGS="$BASE_CPPFLAGS -I\${abs_top_builddir}/src"
NVCC_WRAP="\$(abs_top_srcdir)/contrib/nvcc_wrap.sh"
AC_SUBST([BASE_CPPFLAGS], [$BASE_CPPFLAGS])
AC_SUBST([NVCC_WRAP], [$NVCC_WRAP])
AC_SUBST([NVCC_FLAGS], [$NVCC_FLAGS])
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ AC_CONFIG_FILES([
cmake/ucx-config.cmake
cmake/ucx-targets.cmake
config/Makefile
src/tools/perf/gdaki/Makefile
])

AC_CONFIG_FILES([test/mpi/run_mpi.sh], [chmod a+x test/mpi/run_mpi.sh])
Expand Down Expand Up @@ -426,6 +427,10 @@ AC_MSG_NOTICE([ ROCM modules: <$(echo ${uct_rocm_modules}|tr ':' ' ') >
AC_MSG_NOTICE([ IB modules: <$(echo ${uct_ib_modules}|tr ':' ' ') >])
AC_MSG_NOTICE([ UCM modules: <$(echo ${ucm_modules}|tr ':' ' ') >])
AC_MSG_NOTICE([ Perf modules: <$(echo ${ucx_perftest_modules}|tr ':' ' ') >])
AS_IF([test "x$NVCC" != "xno"], [
AC_MSG_NOTICE([ NVCC path: ${NVCC}])
AC_MSG_NOTICE([ NVCC flags: ${NVCC_FLAGS}])
])
AS_IF([test "x$enable_ucg" != "xno"], [
AC_MSG_NOTICE([ UCG modules: <$(echo ${ucg_modules}|tr ':' ' ') >])])
])
Expand Down
1 change: 1 addition & 0 deletions contrib/configure-devel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $basedir/../configure \
--enable-profiling \
--enable-frame-pointer \
--enable-stats \
--enable-debug \
--enable-debug-data \
--enable-mt \
"$@"
26 changes: 26 additions & 0 deletions contrib/gdaki/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Usage
### Initial

```
cp -r ./ucx-fork/contrib/gdaki ./

cd gdaki
source ./env.sh
./build.sh

sudo su
source ./env.sh
cd ucx
./test/gtest/gtest --gtest_filter=*gdaki*:*ucp_batch*

```
### Incremental
```
ssh rock0X
cd gdaki
source ./env.sh
sudo su
rock01$ ./run_sample.sh -c 1.1.60.10
rock10$ ./run_sample.sh

```
13 changes: 13 additions & 0 deletions contrib/gdaki/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Source ./env.sh

set -e
./clone_rdma.sh
./clone_ucx.sh
./clone_doca.sh

# rdma already built

./build_doca.sh
./build_ucx.sh
12 changes: 12 additions & 0 deletions contrib/gdaki/build_doca.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

source env.sh
mkdir doca/build
cd doca/build

meson setup --prefix=$(pwd)/install \
-Damalgamation_build=true -Denable_gpu_support=true ..

ninja && ninja install
15 changes: 15 additions & 0 deletions contrib/gdaki/build_ucx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Must do: source ./env.sh

set -e

cd ucx-fork
./autogen.sh
./contrib/configure-devel --prefix=$(pwd)/rfs \
--with-verbs=$(pwd)/../rdma-core/build \
--with-cuda=$CUDA_HOME \
--with-gdrcopy=/opt/mellanox/gdrcopy

make -j
make install
16 changes: 16 additions & 0 deletions contrib/gdaki/clone_doca.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

[ -d doca ] && { echo "doca directory already exists"; exit 1; }

set -e

git clone ssh://git-nbu.nvidia.com:12023/doca/doca

#First commit, later reverted
#git checkout -B verbs-gpunetio ea9a643c2f27fd790d6d2197bc6e10af055caf45

cd doca
# git fetch origin refs/changes/75/1253175/2
git checkout -B master origin/master
git am ../doca-00*.patch
cd -
15 changes: 15 additions & 0 deletions contrib/gdaki/clone_rdma.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -eu

[ -d rdma-core ] && { echo "rdma-core already exists"; exit 1; }
git clone https://github.com/linux-rdma/rdma-core.git
cd rdma-core
git checkout v57.0

mkdir build
cd build
cmake -DNO_MAN_PAGES=1 -DCMAKE_INSTALL_PREFIX=$(pwd)/../rfs ../
make -j
make install
cd ../..
7 changes: 7 additions & 0 deletions contrib/gdaki/clone_ucx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

git clone ssh://[email protected]:12051/ofarjon/ucx-fork.git
cd ucx-fork
git checkout origin/ak_wip
git am <../ucx-0*.patch
cd -
46 changes: 46 additions & 0 deletions contrib/gdaki/doca-0001-Trim-dependencies.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From bfa6205caef2e5500211142480e8804403ad90f5 Mon Sep 17 00:00:00 2001
From: Thomas Vegas <[email protected]>
Date: Wed, 11 Jun 2025 07:50:12 +0000
Subject: [PATCH] Trim dependencies

---
samples/doca_gpunetio/dependencies/meson.build | 3 ---
samples/doca_gpunetio/meson.build | 8 --------
2 files changed, 11 deletions(-)

diff --git a/samples/doca_gpunetio/dependencies/meson.build b/samples/doca_gpunetio/dependencies/meson.build
index fa18e01ed7..79d9854dae 100644
--- a/samples/doca_gpunetio/dependencies/meson.build
+++ b/samples/doca_gpunetio/dependencies/meson.build
@@ -26,8 +26,5 @@
# Needed by one of the samples (and by the lib itself) so it is OK to have it here
sample_lib_doca_depends += ['rdma']
sample_lib_doca_depends += ['rdma_verbs']
-sample_lib_doca_depends += ['dpdk_bridge']
# Needed by some of the samples, and is roughly in the same components group, so it is fine
-sample_lib_doca_depends += ['flow']
-sample_lib_doca_depends += ['eth']
sample_lib_doca_depends += ['dma']
diff --git a/samples/doca_gpunetio/meson.build b/samples/doca_gpunetio/meson.build
index 76552dcdec..474723aa4f 100644
--- a/samples/doca_gpunetio/meson.build
+++ b/samples/doca_gpunetio/meson.build
@@ -23,15 +23,7 @@
#

samples = [
- 'gpunetio_send_wait_time',
- 'gpunetio_simple_receive',
- 'gpunetio_simple_send',
- 'gpunetio_rdma_client_server_write',
- 'gpunetio_rdma_verbs_onesided_bw',
- 'gpunetio_rdma_verbs_twosided',
'gpunetio_rdma_verbs_write_bw',
- 'gpunetio_rdma_verbs_write_lat',
- 'gpunetio_dma_memcpy',
]

sample_lib_srcs = files([
--
2.31.1

27 changes: 27 additions & 0 deletions contrib/gdaki/env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

module load dev/cuda12.9.0
module load dev/gdrcopy2.5_cuda12.9.0
#module load hpcx-gcc

sudo yum install -y glib2-devel libzip-devel json-c-devel \
libpcap-devel jsoncpp-devel ninja-build
sudo yum install -y dpdk-devel

if [ $(id -u) -ne 0 ]; then
sudo pip3 install meson>=0.61.2
fi

gdr=$(echo "$INCLUDE" | cut -d: -f 1)
gdr_lib=$(echo "$LIBRARY_PATH" | cut -d: -f1)
ucx=$(pwd)/ucx/rfs
rdma=$(pwd)/rdma-core/rfs
doca=$(pwd)/doca/build/install
sudo ln -sf "$(dirname $gdr)" /opt/mellanox/gdrcopy

export CFLAGS="-I$ucx/include -I$rdma/include -I$gdr -I$doca/include"
export CPPFLAGS="-I$ucx/include -I$rdma/include -I$gdr -I$doca/include"
export CXXFLAGS="-I$ucx/include -I$rdma/include -I$gdr -I$doca/include"
export LDFLAGS="-L$ucx/lib -L$rdma/lib -L$gdr_lib -L$doca/lib64"
export NVCC_FLAGS="-I$doca/include -I$rdma/include"
export LD_LIBRARY_PATH="$rdma/lib:$doca/lib64:$LD_LIBRARY_PATH"
9 changes: 9 additions & 0 deletions contrib/gdaki/run_sample.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Build DOCA with '0001-Trim-dependencies.patch' applied

# Run on Rock as ROOT
#./doca/build/samples/doca_gpunetio_rdma_verbs_write_bw -g 0000:a3:00 -d mlx5_0 -l 70 -c 1.1.60.1

source ./env.sh
./doca/build/samples/doca_gpunetio_rdma_verbs_write_bw -g 0000:a3:00 -d mlx5_0 -l 70 $*
69 changes: 69 additions & 0 deletions contrib/gdaki/ucx-0001-GDAKI-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
From 6844172e352b9ccc78fd265ef5694d3f185b83fa Mon Sep 17 00:00:00 2001
From: root <[email protected]>
Date: Wed, 11 Jun 2025 15:24:04 +0000
Subject: [PATCH] GDAKI build

---
src/ucs/datastruct/mpool.inl | 4 ++++
src/uct/cuda/gdaki/Makefile.am | 2 +-
src/uct/cuda/gdaki/configure.m4 | 2 +-
src/uct/ib/mlx5/rc/rc_mlx5_common.h | 2 +-
4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/ucs/datastruct/mpool.inl b/src/ucs/datastruct/mpool.inl
index 25404ec..054a518 100644
--- a/src/ucs/datastruct/mpool.inl
+++ b/src/ucs/datastruct/mpool.inl
@@ -35,6 +35,10 @@ static inline void *ucs_mpool_get_inline(ucs_mpool_t *mp)
return obj;
}

+#ifndef ENABLE_DEBUG_DATA
+#define ENABLE_DEBUG_DATA 0
+#endif
+
static inline void
ucs_mpool_add_to_freelist(ucs_mpool_t *mp, ucs_mpool_elem_t *elem)
{
diff --git a/src/uct/cuda/gdaki/Makefile.am b/src/uct/cuda/gdaki/Makefile.am
index fffb6ff..50445c8 100644
--- a/src/uct/cuda/gdaki/Makefile.am
+++ b/src/uct/cuda/gdaki/Makefile.am
@@ -14,7 +14,7 @@ libuct_cuda_gdaki_la_LIBADD = $(top_builddir)/src/ucs/libucs.la \
$(top_builddir)/src/uct/ib/libuct_ib.la \
$(top_builddir)/src/uct/ib/mlx5/libuct_ib_mlx5.la \
$(top_builddir)/src/uct/cuda/libuct_cuda.la \
- $(CUDA_LIBS) -ldoca_gpunetio
+ $(CUDA_LIBS) -ldoca_gpunetio -ldoca_rdma_verbs

libuct_cuda_gdaki_la_SOURCES = \
gdaki_iface.c \
diff --git a/src/uct/cuda/gdaki/configure.m4 b/src/uct/cuda/gdaki/configure.m4
index b552d5f..b7dd6a5 100644
--- a/src/uct/cuda/gdaki/configure.m4
+++ b/src/uct/cuda/gdaki/configure.m4
@@ -4,7 +4,7 @@
#

AC_CHECK_HEADERS([doca_gpunetio.h], [
-AC_CHECK_LIB([doca_gpunetio], [doca_gpu_create], [have_gpunetio=yes])])
+AC_CHECK_LIB([doca_gpunetio], [doca_gpu_create], [have_gpunetio=yes], [], [-ldoca_rdma_verbs -ldoca_common])])

AS_IF([test $have_gpunetio = yes], [
uct_cuda_modules="${uct_cuda_modules}:gdaki"
diff --git a/src/uct/ib/mlx5/rc/rc_mlx5_common.h b/src/uct/ib/mlx5/rc/rc_mlx5_common.h
index 22eed92..719cf6e 100644
--- a/src/uct/ib/mlx5/rc/rc_mlx5_common.h
+++ b/src/uct/ib/mlx5/rc/rc_mlx5_common.h
@@ -409,7 +409,7 @@ typedef struct uct_rc_mlx5_iface_common {
uint8_t atomic_fence_flag;
uct_rc_mlx5_srq_topo_t srq_topo;
//uint8_t log_ack_req_freq;
- // uint8_t dp_ordering;
+ uint8_t dp_ordering;
//uint8_t dp_ordering_force;
} config;
UCS_STATS_NODE_DECLARE(stats)
--
2.31.1

Loading