Skip to content

Commit

Permalink
Update build.sh (#445)
Browse files Browse the repository at this point in the history
Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #445
  • Loading branch information
madsbk authored Aug 30, 2024
1 parent 3ce8bcc commit 94edeee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
10 changes: 7 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ VALIDARGS="clean libkvikio kvikio -v -g -n --pydevelop -h"
HELP="$0 [clean] [libkvikio] [kvikio] [-v] [-g] [-n] [--cmake-args=\"<args>\"] [-h]
clean - remove all existing build artifacts and configuration (start over)
libkvikio - build and install the libkvikio C++ code
kvikio - build and install the kvikio Python package
kvikio - build and install the kvikio Python package (requires libkvikio)
-v - verbose build mode
-g - build for debug
-n - no install step
Expand All @@ -32,7 +32,7 @@ HELP="$0 [clean] [libkvikio] [kvikio] [-v] [-g] [-n] [--cmake-args=\"<args>\"] [
default action (no args) is to build and install 'libkvikio' and 'kvikio' targets
"
LIBKVIKIO_BUILD_DIR=${LIBKVIKIO_BUILD_DIR:=${REPODIR}/cpp/build}
KVIKIO_BUILD_DIR="${REPODIR}/python/build ${REPODIR}/python/_skbuild"
KVIKIO_BUILD_DIR="${REPODIR}/python/kvikio/build/"
BUILD_DIRS="${LIBKVIKIO_BUILD_DIR} ${KVIKIO_BUILD_DIR}"

# Set defaults for vars modified by flags to this script
Expand Down Expand Up @@ -111,10 +111,14 @@ fi
# Process flags
if hasArg -v; then
VERBOSE_FLAG=-v
export SKBUILD_BUILD_VERBOSE=true
export SKBUILD_LOGGING_LEVEL=INFO
set -x
fi
if hasArg -g; then
BUILD_TYPE=Debug
export SKBUILD_INSTALL_STRIP=false
export SKBUILD_CMAKE_BUILD_TYPE=Debug
fi
if hasArg -n; then
INSTALL_TARGET=""
Expand Down Expand Up @@ -150,7 +154,7 @@ if (( NUMARGS == 0 )) || hasArg libkvikio; then
cmake --build "${LIBKVIKIO_BUILD_DIR}" -j${PARALLEL_LEVEL} ${VERBOSE_FLAG}
if [[ ${INSTALL_TARGET} != "" ]]; then
echo "installing libkvikio..."
cmake --build "${LIBKVIKIO_BUILD_DIR}" --target install -v ${VERBOSE_FLAG}
cmake --build "${LIBKVIKIO_BUILD_DIR}" --target install ${VERBOSE_FLAG}
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/kvikio/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# Copyright (c) 2018-2024, NVIDIA CORPORATION.

./build.sh kvikio
./build.sh -v kvikio
4 changes: 2 additions & 2 deletions conda/recipes/libkvikio/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

./build.sh -n libkvikio
./build.sh -v -n libkvikio
6 changes: 3 additions & 3 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Install the **nightly release** from the ``rapidsai-nightly`` channel like:
Build from source
-----------------

In order to setup a development environment run:
In order to setup a development environment, we recommend Conda:

.. code-block::
Expand All @@ -48,11 +48,11 @@ In order to setup a development environment run:
# CUDA 12.5
mamba env create --name kvikio-dev --file conda/environments/all_cuda-125_arch-x86_64.yaml
To build and install the extension run:
The Python library depends on the C++ library, thus we build and install both:

.. code-block::
./build.sh kvikio
./build.sh libkvikio kvikio
One might have to define ``CUDA_HOME`` to the path to the CUDA installation.
Expand Down

0 comments on commit 94edeee

Please sign in to comment.