diff --git a/build.sh b/build.sh index 9d6b98ffc..e04442344 100755 --- a/build.sh +++ b/build.sh @@ -18,19 +18,21 @@ ARGS=$* # script, and that this script resides in the repo dir! REPODIR=$(cd $(dirname $0); pwd) -VALIDARGS="clean librmm rmm -v -g -n -s --ptds --no-cudamallocasync -h" +VALIDARGS="clean librmm rmm -v -g -n -s --ptds --no-cudamallocasync -h tests benchmarks" HELP="$0 [clean] [librmm] [rmm] [-v] [-g] [-n] [-s] [--ptds] [--no-cudamallocasync] [--cmake-args=\"\"] [-h] - clean - remove all existing build artifacts and configuration (start over) - librmm - build and install the librmm C++ code - rmm - build and install the rmm Python package - -v - verbose build mode - -g - build for debug - -n - no install step - -s - statically link against cudart - --ptds - enable per-thread default stream - --no-cudamallocasync - disable CUDA malloc async support - --cmake-args=\\\"\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument) - -h - print this text + clean - remove all existing build artifacts and configuration (start over) + librmm - build and install the librmm C++ code + rmm - build and install the rmm Python package + benchmarks - build benchmarks + tests - build tests + -v - verbose build mode + -g - build for debug + -n - no install step + -s - statically link against cudart + --ptds - enable per-thread default stream + --no-cudamallocasync - disable CUDA malloc async support + --cmake-args=\\\"\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument) + -h - print this text default action (no args) is to build and install 'librmm' and 'rmm' targets " @@ -42,6 +44,8 @@ BUILD_DIRS="${LIBRMM_BUILD_DIR} ${RMM_BUILD_DIR}" VERBOSE_FLAG="" BUILD_TYPE=Release INSTALL_TARGET=install +BUILD_BENCHMARKS=OFF +BUILD_TESTS=OFF CUDA_STATIC_RUNTIME=OFF PER_THREAD_DEFAULT_STREAM=OFF CUDA_MALLOC_ASYNC_SUPPORT=ON @@ -92,6 +96,8 @@ function ensureCMakeRan { -DPER_THREAD_DEFAULT_STREAM="${PER_THREAD_DEFAULT_STREAM}" \ -DCUDA_MALLOC_ASYNC_SUPPORT="${CUDA_MALLOC_ASYNC_SUPPORT}" \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DBUILD_TESTS=${BUILD_TESTS} \ + -DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \ ${CMAKE_ARGS} RAN_CMAKE=1 fi @@ -125,6 +131,12 @@ fi if hasArg -n; then INSTALL_TARGET="" fi +if hasArg benchmarks; then + BUILD_BENCHMARKS=ON +fi +if hasArg tests; then + BUILD_TESTS=ON +fi if hasArg -s; then CUDA_STATIC_RUNTIME=ON fi diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index e7239042e..3f8f1f175 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -68,7 +68,7 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then ################################################################################ gpuci_logger "Build and install librmm and rmm" - "$WORKSPACE/build.sh" -v clean librmm rmm + "$WORKSPACE/build.sh" -v clean librmm rmm benchmarks tests ################################################################################ # Test - librmm diff --git a/conda/recipes/librmm/build.sh b/conda/recipes/librmm/build.sh index 2c75e4624..2646dcb5e 100644 --- a/conda/recipes/librmm/build.sh +++ b/conda/recipes/librmm/build.sh @@ -1,4 +1,8 @@ # Copyright (c) 2018-2019, NVIDIA CORPORATION. # This assumes the script is executed from the root of the repo directory -./build.sh -v clean librmm --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" +if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then + ./build.sh -v clean librmm --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" +else + ./build.sh -v clean librmm tests benchmarks --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\" +fi diff --git a/conda/recipes/librmm/meta.yaml b/conda/recipes/librmm/meta.yaml index e54a7edd7..9121885a6 100644 --- a/conda/recipes/librmm/meta.yaml +++ b/conda/recipes/librmm/meta.yaml @@ -27,6 +27,7 @@ build: - CMAKE_C_COMPILER_LAUNCHER - CMAKE_CXX_COMPILER_LAUNCHER - CMAKE_CUDA_COMPILER_LAUNCHER + - PROJECT_FLASH run_exports: - {{ pin_subpackage("librmm", max_pin="x.x") }}