Skip to content
Open
Show file tree
Hide file tree
Changes from 16 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
3 changes: 2 additions & 1 deletion .ci/jenkins/lib/build-container-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ steps:
--base-image-tag "${BASE_IMAGE_TAG}" \
--tag "${LOCAL_TAG_BASE}${arch}" \
--arch "${arch}" \
--build-type debug \
--no-cache

- name: Add Version Info
Expand Down Expand Up @@ -174,7 +175,7 @@ steps:
echo "benchmark/nixlbench/contrib/build.sh --base-image ${BASE_IMAGE} --base-image-tag ${BASE_IMAGE_TAG} --tag local-test-tag --arch ${arch} --no-cache --nixl \$WORKSPACE --ucx \$WORKSPACE/ucx-src"
else
echo "export UCX_REF=${UCX_VERSION}"
echo "contrib/build-container.sh --base-image ${BASE_IMAGE} --base-image-tag ${BASE_IMAGE_TAG} --tag local-test-tag --arch ${arch} --no-cache"
echo "contrib/build-container.sh --base-image ${BASE_IMAGE} --base-image-tag ${BASE_IMAGE_TAG} --tag local-test-tag --arch ${arch} --build-type debug --no-cache"
fi

pipeline_stop:
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/lib/build-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ steps:
ln -sfT $(type -p podman) /usr/bin/docker
# install git for building container image
yum install -y git
contrib/build-container.sh --no-cache
contrib/build-container.sh --build-type debug --no-cache
2 changes: 1 addition & 1 deletion .gitlab/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export CMAKE_PREFIX_PATH="${INSTALL_DIR}:${CMAKE_PREFIX_PATH}"
export UCX_TLS=^cuda_ipc

# shellcheck disable=SC2086
meson setup nixl_build --prefix=${INSTALL_DIR} -Ducx_path=${UCX_INSTALL_DIR} -Dbuild_docs=true -Drust=false ${EXTRA_BUILD_ARGS} -Dlibfabric_path="${LIBFABRIC_INSTALL_DIR}"
meson setup nixl_build --prefix=${INSTALL_DIR} -Ducx_path=${UCX_INSTALL_DIR} -Dbuild_docs=true -Drust=false ${EXTRA_BUILD_ARGS} -Dlibfabric_path="${LIBFABRIC_INSTALL_DIR}" --buildtype=debug
ninja -j"$NPROC" -C nixl_build && ninja -j"$NPROC" -C nixl_build install
mkdir -p dist && cp nixl_build/src/bindings/python/nixl-meta/nixl-*.whl dist/

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ $ ninja install

### Build Options

#### Release build
#### Release build (default)

```bash
$ meson setup <name_of_build_dir> --buildtype=release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove buildtype arg here

```

#### Debug build (default)
#### Debug build

```bash
$ meson setup <name_of_build_dir>
$ meson setup <name_of_build_dir> --buildtype=debug
```

#### NIXL-specific build options
Expand Down Expand Up @@ -170,7 +170,7 @@ For Python examples, see [examples/python/](examples/python/).
### Rust Bindings
#### Build
- Use `-Drust=true` meson option to build rust bindings.
- Use `-Ddebug=false` for a release build.
- Use `--buildtype=debug` for a debug build (default is release).
- Or build manually:
```bash
$ cargo build --release
Expand Down
3 changes: 2 additions & 1 deletion contrib/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ARG NPROC
ARG WHL_DEFAULT_PYTHON_VERSIONS="3.12"
ARG LIBFABRIC_VERSION="v1.21.0"
ARG LIBFABRIC_INSTALL_PATH="/usr/local"
ARG BUILD_TYPE="release"

# Install build dependencies from Ubuntu repository
RUN apt-get update -y && \
Expand Down Expand Up @@ -201,7 +202,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends pybind11-dev
ENV NIXL_PREFIX=$NIXL_PREFIX
RUN rm -rf build && \
mkdir build && \
meson setup -Dlibfabric_path=$LIBFABRIC_INSTALL_PATH build/ --prefix=$NIXL_PREFIX && \
meson setup -Dlibfabric_path=$LIBFABRIC_INSTALL_PATH build/ --prefix=$NIXL_PREFIX --buildtype=$BUILD_TYPE && \
cd build && \
ninja && \
ninja install
Expand Down
3 changes: 2 additions & 1 deletion contrib/Dockerfile.manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ARG DEFAULT_PYTHON_VERSION="3.12"
ARG ARCH="x86_64"
ARG UCX_REF="v1.19.0"
ARG LIBFABRIC_VERSION="v1.21.0"
ARG BUILD_TYPE="release"

RUN yum groupinstall -y 'Development Tools' && \
dnf install -y almalinux-release-synergy && \
Expand Down Expand Up @@ -248,7 +249,7 @@ WORKDIR /workspace/nixl

RUN rm -rf build && \
mkdir build && \
meson setup build/ --prefix=/usr/local/nixl --buildtype=release \
meson setup build/ --prefix=/usr/local/nixl --buildtype=$BUILD_TYPE \
-Dcudapath_lib="/usr/local/cuda/lib64" \
-Dcudapath_inc="/usr/local/cuda/include" && \
cd build && \
Expand Down
12 changes: 12 additions & 0 deletions contrib/build-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ WHL_PYTHON_VERSIONS="3.12"
UCX_REF=${UCX_REF:-v1.19.0}
OS="ubuntu24"
NPROC=${NPROC:-$(nproc)}
BUILD_TYPE="release"

get_options() {
while :; do
Expand Down Expand Up @@ -81,6 +82,14 @@ get_options() {
--no-cache)
NO_CACHE=" --no-cache"
;;
--build-type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Q: maybe better have the same naming? buildtype
Up to you

if [ "$2" ]; then
BUILD_TYPE=$2
shift
else
missing_requirement $1
fi
;;
--tag)
if [ "$2" ]; then
TAG="--tag $2"
Expand Down Expand Up @@ -156,6 +165,7 @@ show_build_options() {
echo "Python Versions for wheel build: ${WHL_PYTHON_VERSIONS}"
echo "Wheel Platform: ${WHL_PLATFORM}"
echo "UCX Ref: ${UCX_REF}"
echo "Build Type: ${BUILD_TYPE}"
}

show_help() {
Expand All @@ -165,6 +175,7 @@ show_help() {
echo " [--wheel-base base platform for wheel builds]"
echo " [--no-cache disable docker build cache]"
echo " [--os [ubuntu24|ubuntu22] to select Ubuntu version]"
echo " [--build-type [debug|release] to select build type (default: release)]"
echo " [--tag tag for image]"
echo " [--python-versions python versions to build for, comma separated]"
echo " [--ucx-upstream use ucx master branch]"
Expand Down Expand Up @@ -196,6 +207,7 @@ BUILD_ARGS+=" --build-arg ARCH=$ARCH"
BUILD_ARGS+=" --build-arg UCX_REF=$UCX_REF"
BUILD_ARGS+=" --build-arg NPROC=$NPROC"
BUILD_ARGS+=" --build-arg OS=$OS"
BUILD_ARGS+=" --build-arg BUILD_TYPE=$BUILD_TYPE"

show_build_options

Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

project('nixl', 'CPP', version: '0.7.1',
default_options: ['buildtype=debug',
default_options: ['buildtype=release',
'werror=true',
'cpp_std=c++17',
'prefix=/opt/nvidia/nvda_nixl'],
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/gpunetio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ NIXL bench also has the option to specify the DOCA GPUNetIO backend. An example

## Caveats

By default NIXL is built with `buildtype=debug` option. This is ok for correctness and debugging.
To run for performace (e.g. with NIXL bench) t's hightly recommended to build NIXL with `buildtype=release`.
To run for performance (e.g. with NIXL bench) it's highly recommended to build NIXL with `buildtype=release`.
For debugging purposes, NIXL can be built with `buildtype=debug`.