From 15418f229f14d13f9d1654e7fed2f2e3a05d16cd Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:11:53 -0400 Subject: [PATCH 01/40] Testing conda compilers --- conda/recipes/libraft/conda_build_config.yaml | 12 ++++++++++ conda/recipes/libraft/meta.yaml | 22 +++++++++++++++++++ .../recipes/pylibraft/conda_build_config.yaml | 14 ++++++++++++ conda/recipes/pylibraft/meta.yaml | 9 +++++++- conda/recipes/pyraft/conda_build_config.yaml | 15 +++++++++++++ conda/recipes/pyraft/meta.yaml | 9 +++++++- 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 conda/recipes/pylibraft/conda_build_config.yaml diff --git a/conda/recipes/libraft/conda_build_config.yaml b/conda/recipes/libraft/conda_build_config.yaml index 874335c231..da29d0f8ad 100644 --- a/conda/recipes/libraft/conda_build_config.yaml +++ b/conda/recipes/libraft/conda_build_config.yaml @@ -1,3 +1,15 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" + cmake_version: - ">=3.20.1,!=3.23.0" diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 5321cf0187..7b38cd2681 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -36,11 +36,17 @@ outputs: - SCCACHE_BUCKET=rapids-sccache - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 + ignore_run_exports_from: + - {{ compiler('cuda') }}+ number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: build: - cmake {{ cmake_version }} + - { { compiler('c') } } + - { { compiler('cxx') } } + - { { compiler('cuda') } } { { cuda_version } } + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - libcusolver {{ libcusolver_version }} @@ -69,6 +75,10 @@ outputs: requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - librmm {{ minor_version }} @@ -95,9 +105,15 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - faiss-proc=*=cuda @@ -123,9 +139,15 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - gmock {{ gtest_version }} diff --git a/conda/recipes/pylibraft/conda_build_config.yaml b/conda/recipes/pylibraft/conda_build_config.yaml new file mode 100644 index 0000000000..aae60bf63a --- /dev/null +++ b/conda/recipes/pylibraft/conda_build_config.yaml @@ -0,0 +1,14 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" + +cmake_version: + - ">=3.20.1,!=3.23.0" \ No newline at end of file diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index 4576e5146f..896b4fdc4d 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -22,13 +22,20 @@ build: - CC - CXX - VERSION_SUFFIX + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: - python x.x - setuptools - cython>=0.29,<0.30 - - cmake>=3.20.1,!=3.23.0 + - cmake {{ cmake_version }} - scikit-build>=0.13.1 - rmm {{ minor_version }} - libraft-headers {{ version }} diff --git a/conda/recipes/pyraft/conda_build_config.yaml b/conda/recipes/pyraft/conda_build_config.yaml index c542be2d20..8546863946 100644 --- a/conda/recipes/pyraft/conda_build_config.yaml +++ b/conda/recipes/pyraft/conda_build_config.yaml @@ -1,2 +1,17 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" + ucx_version: - "1.12.1" + +cmake_version: + - ">=3.20.1,!=3.23.0" \ No newline at end of file diff --git a/conda/recipes/pyraft/meta.yaml b/conda/recipes/pyraft/meta.yaml index 86159622d3..ca89aec042 100644 --- a/conda/recipes/pyraft/meta.yaml +++ b/conda/recipes/pyraft/meta.yaml @@ -23,13 +23,20 @@ build: - CC - CXX - VERSION_SUFFIX + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: - python x.x - setuptools - cython>=0.29,<0.30 - - cmake>=3.20.1,!=3.23.0 + - cmake {{ cmake_version }} - scikit-build>=0.13.1 - rmm {{ minor_version }} - libraft-headers {{ version }} From b06eda7bce8cb926adda00cc57b2a2a35da574f1 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:15:36 -0400 Subject: [PATCH 02/40] Removing accidental copy --- conda/recipes/libraft/meta.yaml | 6 +++--- conda/recipes/pylibraft/meta.yaml | 2 +- conda/recipes/pyraft/meta.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 7b38cd2681..1d58b26467 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -37,7 +37,7 @@ outputs: - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: @@ -106,7 +106,7 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} @@ -140,7 +140,7 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index 896b4fdc4d..09fecf2963 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -23,7 +23,7 @@ build: - CXX - VERSION_SUFFIX ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: diff --git a/conda/recipes/pyraft/meta.yaml b/conda/recipes/pyraft/meta.yaml index ca89aec042..61a0153b5b 100644 --- a/conda/recipes/pyraft/meta.yaml +++ b/conda/recipes/pyraft/meta.yaml @@ -24,7 +24,7 @@ build: - CXX - VERSION_SUFFIX ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: From 9a710af0eb2dceac1b0f13fb85da0cfedc688cd9 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:22:18 -0400 Subject: [PATCH 03/40] Trying again --- conda/recipes/libraft/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 1d58b26467..c0c57e7e5e 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -72,6 +72,8 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} From cd39cb8552f08f774cdac211d71363bd12b12f1a Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:27:43 -0400 Subject: [PATCH 04/40] Moving files --- conda/recipes/libraft/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index c0c57e7e5e..6d86962479 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -36,10 +36,10 @@ outputs: - SCCACHE_BUCKET=rapids-sccache - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 - ignore_run_exports_from: - - {{ compiler('cuda') }} number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} @@ -71,9 +71,9 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: *script_env ignore_run_exports_from: - {{ compiler('cuda') }} + script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -106,9 +106,9 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: *script_env ignore_run_exports_from: - {{ compiler('cuda') }} + script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -140,9 +140,9 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: *script_env ignore_run_exports_from: - {{ compiler('cuda') }} + script_env: *script_env requirements: build: - cmake {{ cmake_version }} From 2bac7c0c52acfa955e123bb1aee0e6cb4601edd0 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:31:45 -0400 Subject: [PATCH 05/40] Ignoring --- conda/recipes/libraft/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 6d86962479..34cdf1102e 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -36,10 +36,10 @@ outputs: - SCCACHE_BUCKET=rapids-sccache - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} +# number: {{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: build: - cmake {{ cmake_version }} @@ -69,7 +69,7 @@ outputs: version: {{ version }} script: build_libraft_distance.sh build: - number: {{ GIT_DESCRIBE_NUMBER }} +# number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} From 9842c2f7f46afd66604cfa35c006ba31a1ed59f4 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:41:53 -0400 Subject: [PATCH 06/40] Moving script env up --- conda/recipes/libraft/meta.yaml | 43 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 34cdf1102e..16bf95642d 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -15,31 +15,33 @@ package: source: git_url: ../../.. +build: + script_env: + - CC + - CXX + - CUDAHOSTCXX + - PARALLEL_LEVEL + - VERSION_SUFFIX + - PROJECT_FLASH + - CMAKE_GENERATOR + - CMAKE_C_COMPILER_LAUNCHER + - CMAKE_CXX_COMPILER_LAUNCHER + - CMAKE_CUDA_COMPILER_LAUNCHER + - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] + - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] + - SCCACHE_BUCKET=rapids-sccache + - SCCACHE_REGION=us-west-2 + - SCCACHE_IDLE_TIMEOUT=32768 + outputs: - name: libraft-headers version: {{ version }} script: build_libraft_headers.sh build: - script_env: &script_env - - CC - - CXX - - CUDAHOSTCXX - - PARALLEL_LEVEL - - VERSION_SUFFIX - - PROJECT_FLASH - - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER - - CMAKE_CXX_COMPILER_LAUNCHER - - CMAKE_CUDA_COMPILER_LAUNCHER - - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - - SCCACHE_BUCKET=rapids-sccache - - SCCACHE_REGION=us-west-2 - - SCCACHE_IDLE_TIMEOUT=32768 -# number: {{ GIT_DESCRIBE_NUMBER }} + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: build: - cmake {{ cmake_version }} @@ -69,11 +71,10 @@ outputs: version: {{ version }} script: build_libraft_distance.sh build: -# number: {{ GIT_DESCRIBE_NUMBER }} + number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -108,7 +109,6 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -142,7 +142,6 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - script_env: *script_env requirements: build: - cmake {{ cmake_version }} From ecc01c9c3d554d327ef8f7290310d1d3ae023abd Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:47:16 -0400 Subject: [PATCH 07/40] Removing some script env properties --- conda/recipes/libraft/meta.yaml | 3 --- conda/recipes/pylibraft/meta.yaml | 4 ---- conda/recipes/pyraft/meta.yaml | 4 ---- 3 files changed, 11 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 16bf95642d..11f0d1f5de 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -17,9 +17,6 @@ source: build: script_env: - - CC - - CXX - - CUDAHOSTCXX - PARALLEL_LEVEL - VERSION_SUFFIX - PROJECT_FLASH diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index 09fecf2963..176d12127b 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -18,10 +18,6 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - VERSION_SUFFIX ignore_run_exports_from: - {{ compiler('cuda') }} diff --git a/conda/recipes/pyraft/meta.yaml b/conda/recipes/pyraft/meta.yaml index 61a0153b5b..f3ed6b2f18 100644 --- a/conda/recipes/pyraft/meta.yaml +++ b/conda/recipes/pyraft/meta.yaml @@ -19,10 +19,6 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - VERSION_SUFFIX ignore_run_exports_from: - {{ compiler('cuda') }} From e9ca15cf1f795bd0fcfe1fc35e4b6aa8e890d316 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:53:07 -0400 Subject: [PATCH 08/40] Trying again --- conda/recipes/libraft/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 11f0d1f5de..b893ae50ae 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -41,11 +41,11 @@ outputs: - {{ compiler('cuda') }} requirements: build: - - cmake {{ cmake_version }} - - { { compiler('c') } } - - { { compiler('cxx') } } - - { { compiler('cuda') } } { { cuda_version } } + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} - sysroot_{{ target_platform }} {{ sysroot_version }} + - cmake {{ cmake_version }} host: - cudatoolkit {{ cuda_version }}.* - libcusolver {{ libcusolver_version }} From 5a6a7f062b11a23fcbb6d4790acc3e41b5a41925 Mon Sep 17 00:00:00 2001 From: Jordan Jacobelli Date: Fri, 3 Jun 2022 17:00:52 +0200 Subject: [PATCH 09/40] Consolidate C++ conda recipes and add libraft-tests package (#641) This PR includes the following changes: - Adds a `libraft-tests` package to the `libraft-split` recipe - This is a prerequisite for removing "Project Flash" from our build/CI scripts - The `libraft-tests` package was added as an additional output to the `libraft-split` recipe - Consolidates remaining C++ recipes into `libraft-split` recipe - This gets rid of a lot of duplicate code between the recipes and reduces the number of times we have to call conda build in our CI scripts - Migrate the "from sources" builds done in GPU tests by building packages using conda. This is done for the following reasons: - This is required step to improve the Ops CI/CD setup to a more convenient pipeline - This is required to start using conda compilers and `mamba` to build RAPIDS packages - This prevent us from manually managing and installing the dependencies in GPU job - This ensure the packages can be installed (no conda conflict while installing) - This ensure the tests are running and working against the package content and not the build results. Currently the Python packages are not tested Dependency version specs are now specified in `conda/recipes/libraft/conda_build_config.yaml`. The exception here is the version spec used for cudatoolkit since that comes from an environment variable in the CI process. Authors: - Jordan Jacobelli (https://github.com/Ethyling) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - AJ Schmidt (https://github.com/ajschmidt8) URL: https://github.com/rapidsai/raft/pull/641 --- ci/cpu/build.sh | 35 ++--- ci/cpu/upload.sh | 34 +--- ci/gpu/build.sh | 75 +++------ .../build_libraft_distance.sh} | 0 .../build_libraft_headers.sh} | 0 .../build.sh => libraft/build_libraft_nn.sh} | 0 conda/recipes/libraft/build_libraft_tests.sh | 5 + conda/recipes/libraft/conda_build_config.yaml | 14 ++ conda/recipes/libraft/meta.yaml | 146 ++++++++++++++++++ conda/recipes/libraft_distance/meta.yaml | 61 -------- conda/recipes/libraft_headers/meta.yaml | 60 ------- conda/recipes/libraft_nn/meta.yaml | 60 ------- cpp/CMakeLists.txt | 3 +- python/pylibraft/pylibraft/test/__init__.py | 14 -- python/raft/raft/test/__init__.py | 14 -- 15 files changed, 204 insertions(+), 317 deletions(-) rename conda/recipes/{libraft_distance/build.sh => libraft/build_libraft_distance.sh} (100%) rename conda/recipes/{libraft_headers/build.sh => libraft/build_libraft_headers.sh} (100%) rename conda/recipes/{libraft_nn/build.sh => libraft/build_libraft_nn.sh} (100%) create mode 100644 conda/recipes/libraft/build_libraft_tests.sh create mode 100644 conda/recipes/libraft/conda_build_config.yaml create mode 100644 conda/recipes/libraft/meta.yaml delete mode 100644 conda/recipes/libraft_distance/meta.yaml delete mode 100644 conda/recipes/libraft_headers/meta.yaml delete mode 100644 conda/recipes/libraft_nn/meta.yaml delete mode 100644 python/pylibraft/pylibraft/test/__init__.py delete mode 100644 python/raft/raft/test/__init__.py diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 6ad788d017..687c29029b 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -22,7 +22,9 @@ cd $WORKSPACE # If nightly build, append current YYMMDD to version if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then - export VERSION_SUFFIX=`date +%y%m%d` + export VERSION_SUFFIX=$(date +%y%m%d) +else + export VERSION_SUFFIX="" fi # Setup 'gpuci_conda_retry' for build retries (results in 2 total attempts) @@ -65,13 +67,8 @@ conda list --show-channel-urls # FIX Added to deal with Anancoda SSL verification issues during conda builds conda config --set ssl_verify False -# FIXME: for now, force the building of all packages so they are built on a -# machine with a single CUDA version, then have the gpu/build.sh script simply -# install. This should eliminate a mismatch between different CUDA versions on -# cpu vs. gpu builds that is problematic with CUDA 11.5 Enhanced Compat. if [ "$BUILD_LIBRAFT" == "1" ]; then - BUILD_RAFT=1 - # If we are doing CUDA + Python builds, libraft package is located at ${CONDA_BLD_DIR} + # If we are doing CUDA builds, libraft package is located at ${CONDA_BLD_DIR} CONDA_LOCAL_CHANNEL="${CONDA_BLD_DIR}" else # If we are doing Python builds only, libraft package is placed here by Project Flash @@ -85,29 +82,17 @@ gpuci_mamba_retry install -c conda-forge boa ############################################################################### if [ "$BUILD_LIBRAFT" == "1" ]; then - gpuci_logger "Building conda packages for libraft-nn, libraft-distance, and libraft-headers" + gpuci_logger "Building conda packages for libraft-nn, libraft-distance, libraft-headers and libraft-tests" if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libraft_headers - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libraft_nn - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libraft_distance + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libraft else - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libraft_headers - gpuci_logger "`ls ${CONDA_BLD_DIR}/work`" - mkdir -p ${CONDA_BLD_DIR}/libraft_headers/work - mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libraft_headers/work - - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libraft_nn - gpuci_logger "`ls ${CONDA_BLD_DIR}/work`" - mkdir -p ${CONDA_BLD_DIR}/libraft_nn/work - mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libraft_nn/work - - gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libraft_distance + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libraft gpuci_logger "`ls ${CONDA_BLD_DIR}/work`" - mkdir -p ${CONDA_BLD_DIR}/libraft_distance/work - mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libraft_distance/work + mkdir -p ${CONDA_BLD_DIR}/libraft/work + mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libraft/work fi else - gpuci_logger "SKIPPING build of conda packages for libraft-nn, libraft-distance and libraft-headers" + gpuci_logger "SKIPPING build of conda packages for libraft-nn, libraft-distance, libraft-headers and libraft-tests" fi if [ "$BUILD_RAFT" == '1' ]; then diff --git a/ci/cpu/upload.sh b/ci/cpu/upload.sh index 9126423008..dfd6ea3986 100755 --- a/ci/cpu/upload.sh +++ b/ci/cpu/upload.sh @@ -10,7 +10,7 @@ export GPUCI_RETRY_MAX=3 export GPUCI_RETRY_SLEEP=30 # Set label option. -# LABEL_OPTION="--label testing" +#LABEL_OPTION="--label testing" LABEL_OPTION="--label main" # Skip uploads unless BUILD_MODE == "branch" @@ -25,18 +25,6 @@ if [ -z "$MY_UPLOAD_KEY" ]; then return 0 fi -################################################################################ -# SETUP - Get conda file output locations -################################################################################ - -gpuci_logger "Get conda file output locations" - -export LIBRAFT_HEADERS_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/libraft_headers --output` -export LIBRAFT_NN_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/libraft_nn --output` -export LIBRAFT_DISTANCE_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/libraft_distance --output` -export PYRAFT_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/pyraft --python=$PYTHON --output` -export PYLIBRAFT_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/pylibraft --python=$PYTHON --output` - ################################################################################ # UPLOAD - Conda packages ################################################################################ @@ -44,24 +32,14 @@ export PYLIBRAFT_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${C gpuci_logger "Starting conda uploads" if [[ "$BUILD_LIBRAFT" == "1" && "$UPLOAD_LIBRAFT" == "1" ]]; then - - test -e ${LIBRAFT_HEADERS_FILE} - echo "Upload libraft-headers" - echo ${LIBRAFT_HEADERS_FILE} - gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBRAFT_HEADERS_FILE} --no-progress - - test -e ${LIBRAFT_NN_FILE} - echo "Upload libraft-nn" - echo ${LIBRAFT_NN_FILE} - gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBRAFT_NN_FILE} --no-progress - - test -e ${LIBRAFT_DISTANCE_FILE} - echo "Upload libraft-distance" - echo ${LIBRAFT_DISTANCE_FILE} - gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBRAFT_DISTANCE_FILE} --no-progress + LIBRAFT_FILES=$(conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/libraft --output) + echo "Upload libraft-headers, libraft-nn, libraft-distance and libraft-tests" + gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing --no-progress ${LIBRAFT_FILES} fi if [[ "$BUILD_RAFT" == "1" ]]; then + PYRAFT_FILE=$(conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/pyraft --python=$PYTHON --output) + PYLIBRAFT_FILE=$(conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/pylibraft --python=$PYTHON --output) test -e ${PYRAFT_FILE} echo "Upload pyraft" echo ${PYRAFT_FILE} diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 2d96432e58..9f8ff3a996 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -25,18 +25,11 @@ export HOME="$WORKSPACE" cd "$WORKSPACE" export GIT_DESCRIBE_TAG=`git describe --tags` export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` +unset GIT_DESCRIBE_TAG # ucx-py version export UCX_PY_VERSION='0.26.*' -export CMAKE_CUDA_COMPILER_LAUNCHER="sccache" -export CMAKE_CXX_COMPILER_LAUNCHER="sccache" -export CMAKE_C_COMPILER_LAUNCHER="sccache" -export SCCACHE_S3_KEY_PREFIX="libraft-$(uname -m)" -export SCCACHE_BUCKET="rapids-sccache" -export SCCACHE_REGION="us-west-2" -export SCCACHE_IDLE_TIMEOUT="32768" - ################################################################################ # SETUP - Check environment ################################################################################ @@ -47,40 +40,14 @@ env gpuci_logger "Check GPU usage" nvidia-smi -# temporary usage of gpuci_mamba_retry install with packages listed here, looking into -# using the repos yaml files for this gpuci_logger "Activate conda env" . /opt/conda/etc/profile.d/conda.sh conda activate rapids -gpuci_logger "Installing packages needed for RAFT" -gpuci_mamba_retry install -y -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ - "cudatoolkit=${CUDA_REL}" \ - "libcusolver>=11.2.1" \ - "cudf=${MINOR_VERSION}" \ - "rmm=${MINOR_VERSION}" \ - "breathe" \ - "dask-cudf=${MINOR_VERSION}" \ - "dask-cuda=${MINOR_VERSION}" \ - "ucx-py=${UCX_PY_VERSION}" \ - "rapids-build-env=${MINOR_VERSION}.*" \ - "rapids-notebook-env=${MINOR_VERSION}.*" - -if [ "$(arch)" = "x86_64" ]; then - gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ - "rapids-doc-env=${MINOR_VERSION}.*" -fi - -# Install the master version of dask, distributed, and dask-ml -gpuci_logger "Install the master version of dask and distributed" -set -x -pip install "git+https://github.com/dask/distributed.git@2022.05.2" --upgrade --no-deps -pip install "git+https://github.com/dask/dask.git@2022.05.2" --upgrade --no-deps -set +x # Install pre-built conda packages from previous CI step gpuci_logger "Install libraft conda packages from CPU job" -export LIBRAFT_CONDA_PACKAGES="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here -gpuci_mamba_retry install -c "${LIBRAFT_CONDA_PACKAGES}" libraft-headers libraft-distance libraft-nn +CONDA_ARTIFACT_PATH="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here +gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn libraft-tests gpuci_logger "Check compiler versions" python --version @@ -96,24 +63,16 @@ conda list --show-channel-urls # BUILD - Build RAFT tests ################################################################################ -gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" - -export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH - -gpuci_logger "Build C++ and Python targets" -# These should link against the existing shared libs -if hasArg --skip-tests; then - "$WORKSPACE/build.sh" pyraft pylibraft libraft -v -else - "$WORKSPACE/build.sh" pyraft pylibraft libraft tests bench -v -fi +gpuci_logger "Build and install Python targets" +CONDA_BLD_DIR="$WORKSPACE/.conda-bld" +gpuci_mamba_retry install boa +gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft gpuci_logger "sccache stats" sccache --show-stats -gpuci_logger "Building docs" -"$WORKSPACE/build.sh" docs -v - ################################################################################ # TEST - Run GoogleTest and py.tests for RAFT ################################################################################ @@ -123,22 +82,30 @@ if hasArg --skip-tests; then exit 0 fi +# Install the master version of dask, distributed, and dask-ml +gpuci_logger "Install the master version of dask and distributed" +set -x +pip install "git+https://github.com/dask/distributed.git@2022.05.2" --upgrade --no-deps +pip install "git+https://github.com/dask/dask.git@2022.05.2" --upgrade --no-deps +set +x + gpuci_logger "Check GPU usage" nvidia-smi gpuci_logger "GoogleTest for raft" -cd "$WORKSPACE/cpp/build" -GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" ./test_raft +cd "$WORKSPACE" +GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" "$CONDA_PREFIX/bin/libraft/gtests/test_raft" gpuci_logger "Python pytest for pyraft" -cd "$WORKSPACE/python/raft" +cd "$WORKSPACE/python/raft/raft/test" python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pyraft.xml" -v -s gpuci_logger "Python pytest for pylibraft" -cd "$WORKSPACE/python/pylibraft" +cd "$WORKSPACE/python/pylibraft/pylibraft/test" python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pylibraft.xml" -v -s if [ "$(arch)" = "x86_64" ]; then gpuci_logger "Building docs" + gpuci_mamba_retry install "rapids-doc-env=${MINOR_VERSION}.*" "$WORKSPACE/build.sh" docs -v fi diff --git a/conda/recipes/libraft_distance/build.sh b/conda/recipes/libraft/build_libraft_distance.sh similarity index 100% rename from conda/recipes/libraft_distance/build.sh rename to conda/recipes/libraft/build_libraft_distance.sh diff --git a/conda/recipes/libraft_headers/build.sh b/conda/recipes/libraft/build_libraft_headers.sh similarity index 100% rename from conda/recipes/libraft_headers/build.sh rename to conda/recipes/libraft/build_libraft_headers.sh diff --git a/conda/recipes/libraft_nn/build.sh b/conda/recipes/libraft/build_libraft_nn.sh similarity index 100% rename from conda/recipes/libraft_nn/build.sh rename to conda/recipes/libraft/build_libraft_nn.sh diff --git a/conda/recipes/libraft/build_libraft_tests.sh b/conda/recipes/libraft/build_libraft_tests.sh new file mode 100644 index 0000000000..040a2f8b8c --- /dev/null +++ b/conda/recipes/libraft/build_libraft_tests.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Copyright (c) 2022, NVIDIA CORPORATION. + +./build.sh tests bench -v --allgpuarch --no-nvtx +cmake --install cpp/build --component testing diff --git a/conda/recipes/libraft/conda_build_config.yaml b/conda/recipes/libraft/conda_build_config.yaml new file mode 100644 index 0000000000..874335c231 --- /dev/null +++ b/conda/recipes/libraft/conda_build_config.yaml @@ -0,0 +1,14 @@ +cmake_version: + - ">=3.20.1,!=3.23.0" + +nccl_version: + - ">=2.9.9" + +gtest_version: + - "=1.10.0" + +libcusolver_version: + - ">=11.2.1" + +libfaiss_version: + - "1.7.0 *_cuda" diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml new file mode 100644 index 0000000000..5321cf0187 --- /dev/null +++ b/conda/recipes/libraft/meta.yaml @@ -0,0 +1,146 @@ +# Copyright (c) 2022, NVIDIA CORPORATION. + +# Usage: +# conda build . -c conda-forge -c nvidia -c rapidsai +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} +{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} +{% set cuda_version = '.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %} +{% set cuda_major = cuda_version.split('.')[0] %} +{% set ucx_py_version = environ.get('UCX_PY_VERSION') %} +{% set cuda_spec = ">=" + cuda_major ~ ",<" + (cuda_major | int + 1) ~ ".0a0" %} # i.e. >=11,<12.0a0 + +package: + name: libraft-split + +source: + git_url: ../../.. + +outputs: + - name: libraft-headers + version: {{ version }} + script: build_libraft_headers.sh + build: + script_env: &script_env + - CC + - CXX + - CUDAHOSTCXX + - PARALLEL_LEVEL + - VERSION_SUFFIX + - PROJECT_FLASH + - CMAKE_GENERATOR + - CMAKE_C_COMPILER_LAUNCHER + - CMAKE_CXX_COMPILER_LAUNCHER + - CMAKE_CUDA_COMPILER_LAUNCHER + - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] + - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] + - SCCACHE_BUCKET=rapids-sccache + - SCCACHE_REGION=us-west-2 + - SCCACHE_IDLE_TIMEOUT=32768 + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + requirements: + build: + - cmake {{ cmake_version }} + host: + - cudatoolkit {{ cuda_version }}.* + - libcusolver {{ libcusolver_version }} + - librmm {{ minor_version }} + - nccl {{ nccl_version }} + - ucx-proc=*=gpu + - ucx-py {{ ucx_py_version }} + run: + - cudatoolkit {{ cuda_spec }} + - libcusolver {{ libcusolver_version }} + - librmm {{ minor_version }} + - nccl {{ nccl_version }} + - ucx-proc=*=gpu + - ucx-py {{ ucx_py_version }} + about: + home: http://rapids.ai/ + license: Apache-2.0 + summary: libraft-headers library + - name: libraft-distance + version: {{ version }} + script: build_libraft_distance.sh + build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + script_env: *script_env + requirements: + build: + - cmake {{ cmake_version }} + host: + - cudatoolkit {{ cuda_version }}.* + - librmm {{ minor_version }} + - nccl {{ nccl_version }} + - ucx-proc=*=gpu + - ucx-py {{ ucx_py_version }} + - {{ pin_subpackage('libraft-headers', exact=True) }} + run: + - cudatoolkit {{ cuda_spec }} + - libcusolver {{ libcusolver_version }} + - librmm {{ minor_version }} + - nccl {{ nccl_version }} + - ucx-proc=*=gpu + - ucx-py {{ ucx_py_version }} + - {{ pin_subpackage('libraft-headers', exact=True) }} + about: + home: http://rapids.ai/ + license: Apache-2.0 + summary: libraft-distance library + - name: libraft-nn + version: {{ version }} + script: build_libraft_nn.sh + build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + script_env: *script_env + requirements: + build: + - cmake {{ cmake_version }} + host: + - cudatoolkit {{ cuda_version }}.* + - faiss-proc=*=cuda + - lapack + - libfaiss {{ libfaiss_version }} + - librmm {{ minor_version }} + - {{ pin_subpackage('libraft-headers', exact=True) }} + run: + - cudatoolkit {{ cuda_spec }} + - faiss-proc=*=cuda + - libcusolver {{ libcusolver_version }} + - libfaiss {{ libfaiss_version }} + - librmm {{ minor_version }} + - {{ pin_subpackage('libraft-headers', exact=True) }} + about: + home: http://rapids.ai/ + license: Apache-2.0 + summary: libraft-nn library + - name: libraft-tests + version: {{ version }} + script: build_libraft_tests.sh + build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + script_env: *script_env + requirements: + build: + - cmake {{ cmake_version }} + host: + - cudatoolkit {{ cuda_version }}.* + - gmock {{ gtest_version }} + - gtest {{ gtest_version }} + - {{ pin_subpackage('libraft-distance', exact=True) }} + - {{ pin_subpackage('libraft-headers', exact=True) }} + - {{ pin_subpackage('libraft-nn', exact=True) }} + run: + - cudatoolkit {{ cuda_spec }} + - gmock {{ gtest_version }} + - gtest {{ gtest_version }} + - {{ pin_subpackage('libraft-distance', exact=True) }} + - {{ pin_subpackage('libraft-headers', exact=True) }} + - {{ pin_subpackage('libraft-nn', exact=True) }} + about: + home: http://rapids.ai/ + license: Apache-2.0 + summary: libraft tests diff --git a/conda/recipes/libraft_distance/meta.yaml b/conda/recipes/libraft_distance/meta.yaml deleted file mode 100644 index 9b78bd15f3..0000000000 --- a/conda/recipes/libraft_distance/meta.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. - -# Usage: -# conda build . -c conda-forge -c nvidia -c rapidsai -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} -{% set cuda_version='.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %} -{% set cuda_major=cuda_version.split('.')[0] %} -{% set ucx_py_version=environ.get('UCX_PY_VERSION') %} -package: - name: libraft-distance - version: {{ version }} - -source: - git_url: ../../.. - -build: - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - CUDAHOSTCXX - - PARALLEL_LEVEL - - VERSION_SUFFIX - - PROJECT_FLASH - - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER - - CMAKE_CXX_COMPILER_LAUNCHER - - CMAKE_CUDA_COMPILER_LAUNCHER - - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - - SCCACHE_BUCKET=rapids-sccache - - SCCACHE_REGION=us-west-2 - - SCCACHE_IDLE_TIMEOUT=32768 - -requirements: - build: - - cmake>=3.20.1,!=3.23.0 - host: - - libraft-headers {{ version }} - - nccl>=2.9.9 - - cudatoolkit {{ cuda_version }}.* - - ucx-py {{ ucx_py_version }} - - ucx-proc=*=gpu - - gtest=1.10.0 - - librmm {{ minor_version }} - run: - - libraft-headers {{ version }} - - nccl>=2.9.9 - - ucx-py {{ ucx_py_version }} - - ucx-proc=*=gpu - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - - libcusolver>=11.2.1 - - librmm {{ minor_version }} - -about: - home: http://rapids.ai/ - license: Apache-2.0 - # license_file: LICENSE - summary: libraft-distance library diff --git a/conda/recipes/libraft_headers/meta.yaml b/conda/recipes/libraft_headers/meta.yaml deleted file mode 100644 index fd95da66ee..0000000000 --- a/conda/recipes/libraft_headers/meta.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. - -# Usage: - # conda build . -c conda-forge -c nvidia -c rapidsai -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} -{% set cuda_version='.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %} -{% set cuda_major=cuda_version.split('.')[0] %} -{% set ucx_py_version=environ.get('UCX_PY_VERSION') %} -package: - name: libraft-headers - version: {{ version }} - -source: - git_url: ../../.. - -build: - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - CUDAHOSTCXX - - PARALLEL_LEVEL - - VERSION_SUFFIX - - PROJECT_FLASH - - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER - - CMAKE_CXX_COMPILER_LAUNCHER - - CMAKE_CUDA_COMPILER_LAUNCHER - - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - - SCCACHE_BUCKET=rapids-sccache - - SCCACHE_REGION=us-west-2 - - SCCACHE_IDLE_TIMEOUT=32768 - -requirements: - build: - - cmake>=3.20.1,!=3.23.0 - host: - - nccl>=2.9.9 - - cudatoolkit {{ cuda_version }}.* - - ucx-py {{ ucx_py_version }} - - ucx-proc=*=gpu - - gtest=1.10.0 - - librmm {{ minor_version}} - - libcusolver>=11.2.1 - run: - - nccl>=2.9.9 - - librmm {{ minor_version}} - - ucx-py {{ ucx_py_version }} - - ucx-proc=*=gpu - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - - libcusolver>=11.2.1 - -about: - home: http://rapids.ai/ - license: Apache-2.0 - # license_file: LICENSE - summary: libraft-headers library diff --git a/conda/recipes/libraft_nn/meta.yaml b/conda/recipes/libraft_nn/meta.yaml deleted file mode 100644 index fa3392ddc8..0000000000 --- a/conda/recipes/libraft_nn/meta.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. - -# Usage: -# conda build . -c conda-forge -c nvidia -c rapidsai -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} -{% set cuda_version='.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %} -{% set cuda_major=cuda_version.split('.')[0] %} -{% set ucx_py_version=environ.get('UCX_PY_VERSION') %} -package: - name: libraft-nn - version: {{ version }} - -source: - git_url: ../../.. - -build: - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - CUDAHOSTCXX - - PARALLEL_LEVEL - - VERSION_SUFFIX - - PROJECT_FLASH - - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER - - CMAKE_CXX_COMPILER_LAUNCHER - - CMAKE_CUDA_COMPILER_LAUNCHER - - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - - SCCACHE_BUCKET=rapids-sccache - - SCCACHE_REGION=us-west-2 - - SCCACHE_IDLE_TIMEOUT=32768 - -requirements: - build: - - cmake>=3.20.1,!=3.23.0 - host: - - libraft-headers {{ version }} - - cudatoolkit {{ cuda_version }}.* - - lapack - - faiss-proc=*=cuda - - libfaiss 1.7.0 *_cuda - - gtest=1.10.0 - - librmm {{ minor_version }} - run: - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - - libraft-headers {{ version }} - - faiss-proc=*=cuda - - libfaiss 1.7.0 *_cuda - - libcusolver>=11.2.1 - - librmm {{ minor_version }} - -about: - home: http://rapids.ai/ - license: Apache-2.0 - # license_file: LICENSE - summary: libraft-nn library diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9902bdded7..e48ac8b4d1 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -369,7 +369,8 @@ if(TARGET raft_distance_lib) COMPONENT distance EXPORT raft-distance-lib-exports) install(DIRECTORY include/raft_distance - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT distance) endif() if(TARGET raft_nn_lib) diff --git a/python/pylibraft/pylibraft/test/__init__.py b/python/pylibraft/pylibraft/test/__init__.py deleted file mode 100644 index 273b4497cc..0000000000 --- a/python/pylibraft/pylibraft/test/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# diff --git a/python/raft/raft/test/__init__.py b/python/raft/raft/test/__init__.py deleted file mode 100644 index 99e0b7fac2..0000000000 --- a/python/raft/raft/test/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# \ No newline at end of file From 9a9e0a8d18bb47977d2e2cd4d78d932394149211 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 3 Jun 2022 13:04:08 -0700 Subject: [PATCH 10/40] Avoid shadowing CMAKE_ARGS variable in build.sh (#701) `CMAKE_ARGS` is a special environment variable in conda-forge's build process, so we need to avoid shadowing it. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/raft/pull/701 --- build.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index 6e79bec897..bdaa607691 100755 --- a/build.sh +++ b/build.sh @@ -101,12 +101,12 @@ function cmakeArgs { # There are possible weird edge cases that may cause this regex filter to output nothing and fail silently # the true pipe will catch any weird edge cases that may happen and will cause the program to fall back # on the invalid option error - CMAKE_ARGS=$(echo $ARGS | { grep -Eo "\-\-cmake\-args=\".+\"" || true; }) - if [[ -n ${CMAKE_ARGS} ]]; then - # Remove the full CMAKE_ARGS argument from list of args so that it passes validArgs function - ARGS=${ARGS//$CMAKE_ARGS/} + EXTRA_CMAKE_ARGS=$(echo $ARGS | { grep -Eo "\-\-cmake\-args=\".+\"" || true; }) + if [[ -n ${EXTRA_CMAKE_ARGS} ]]; then + # Remove the full EXTRA_CMAKE_ARGS argument from list of args so that it passes validArgs function + ARGS=${ARGS//$EXTRA_CMAKE_ARGS/} # Filter the full argument down to just the extra string that will be added to cmake call - CMAKE_ARGS=$(echo $CMAKE_ARGS | grep -Eo "\".+\"" | sed -e 's/^"//' -e 's/"$//') + EXTRA_CMAKE_ARGS=$(echo $EXTRA_CMAKE_ARGS | grep -Eo "\".+\"" | sed -e 's/^"//' -e 's/"$//') fi fi } @@ -196,9 +196,9 @@ if [[ ${CMAKE_TARGET} == "" ]]; then CMAKE_TARGET="all" fi -# Append `-DFIND_RAFT_CPP=ON` to CMAKE_ARGS unless a user specified the option. -if [[ "${CMAKE_ARGS}" != *"DFIND_RAFT_CPP"* ]]; then - CMAKE_ARGS="${CMAKE_ARGS} -DFIND_RAFT_CPP=ON" +# Append `-DFIND_RAFT_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option. +if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_RAFT_CPP"* ]]; then + EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DFIND_RAFT_CPP=ON" fi # If clean given, run it prior to any other steps @@ -250,7 +250,7 @@ if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || has -DRAFT_COMPILE_DIST_LIBRARY=${COMPILE_DIST_LIBRARY} \ -DRAFT_USE_FAISS_STATIC=${BUILD_STATIC_FAISS} \ -DRAFT_ENABLE_thrust_DEPENDENCY=${ENABLE_thrust_DEPENDENCY} \ - ${CMAKE_ARGS} + ${EXTRA_CMAKE_ARGS} if [[ ${CMAKE_TARGET} != "" ]]; then echo "-- Compiling targets: ${CMAKE_TARGET}, verbose=${VERBOSE_FLAG}" @@ -266,9 +266,9 @@ fi if (( ${NUMARGS} == 0 )) || hasArg pyraft || hasArg docs; then cd ${REPODIR}/python/raft - python setup.py build_ext -j${PARALLEL_LEVEL:-1} --inplace -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIBRAFT_BUILD_DIR} ${CMAKE_ARGS} + python setup.py build_ext -j${PARALLEL_LEVEL:-1} --inplace -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIBRAFT_BUILD_DIR} ${EXTRA_CMAKE_ARGS} if [[ ${INSTALL_TARGET} != "" ]]; then - python setup.py install --single-version-externally-managed --record=record.txt -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} ${CMAKE_ARGS} + python setup.py install --single-version-externally-managed --record=record.txt -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} ${EXTRA_CMAKE_ARGS} fi fi @@ -276,9 +276,9 @@ fi if (( ${NUMARGS} == 0 )) || hasArg pylibraft; then cd ${REPODIR}/python/pylibraft - python setup.py build_ext -j${PARALLEL_LEVEL:-1} --inplace -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIBRAFT_BUILD_DIR} ${CMAKE_ARGS} + python setup.py build_ext -j${PARALLEL_LEVEL:-1} --inplace -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIBRAFT_BUILD_DIR} ${EXTRA_CMAKE_ARGS} if [[ ${INSTALL_TARGET} != "" ]]; then - python setup.py install --single-version-externally-managed --record=record.txt -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} ${CMAKE_ARGS} + python setup.py install --single-version-externally-managed --record=record.txt -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} ${EXTRA_CMAKE_ARGS} fi fi From 11706062bfff5e53adb3be53cdc8efe4cdf2a873 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:11:53 -0400 Subject: [PATCH 11/40] Testing conda compilers --- conda/recipes/libraft/conda_build_config.yaml | 12 ++++++++++ conda/recipes/libraft/meta.yaml | 22 +++++++++++++++++++ .../recipes/pylibraft/conda_build_config.yaml | 14 ++++++++++++ conda/recipes/pylibraft/meta.yaml | 9 +++++++- conda/recipes/pyraft/conda_build_config.yaml | 15 +++++++++++++ conda/recipes/pyraft/meta.yaml | 9 +++++++- 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 conda/recipes/pylibraft/conda_build_config.yaml diff --git a/conda/recipes/libraft/conda_build_config.yaml b/conda/recipes/libraft/conda_build_config.yaml index 874335c231..da29d0f8ad 100644 --- a/conda/recipes/libraft/conda_build_config.yaml +++ b/conda/recipes/libraft/conda_build_config.yaml @@ -1,3 +1,15 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" + cmake_version: - ">=3.20.1,!=3.23.0" diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 5321cf0187..7b38cd2681 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -36,11 +36,17 @@ outputs: - SCCACHE_BUCKET=rapids-sccache - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 + ignore_run_exports_from: + - {{ compiler('cuda') }}+ number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: build: - cmake {{ cmake_version }} + - { { compiler('c') } } + - { { compiler('cxx') } } + - { { compiler('cuda') } } { { cuda_version } } + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - libcusolver {{ libcusolver_version }} @@ -69,6 +75,10 @@ outputs: requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - librmm {{ minor_version }} @@ -95,9 +105,15 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - faiss-proc=*=cuda @@ -123,9 +139,15 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: - cmake {{ cmake_version }} + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} host: - cudatoolkit {{ cuda_version }}.* - gmock {{ gtest_version }} diff --git a/conda/recipes/pylibraft/conda_build_config.yaml b/conda/recipes/pylibraft/conda_build_config.yaml new file mode 100644 index 0000000000..aae60bf63a --- /dev/null +++ b/conda/recipes/pylibraft/conda_build_config.yaml @@ -0,0 +1,14 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" + +cmake_version: + - ">=3.20.1,!=3.23.0" \ No newline at end of file diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index 4576e5146f..896b4fdc4d 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -22,13 +22,20 @@ build: - CC - CXX - VERSION_SUFFIX + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: - python x.x - setuptools - cython>=0.29,<0.30 - - cmake>=3.20.1,!=3.23.0 + - cmake {{ cmake_version }} - scikit-build>=0.13.1 - rmm {{ minor_version }} - libraft-headers {{ version }} diff --git a/conda/recipes/pyraft/conda_build_config.yaml b/conda/recipes/pyraft/conda_build_config.yaml index c542be2d20..8546863946 100644 --- a/conda/recipes/pyraft/conda_build_config.yaml +++ b/conda/recipes/pyraft/conda_build_config.yaml @@ -1,2 +1,17 @@ +c_compiler_version: + - 9 + +cxx_compiler_version: + - 9 + +cuda_compiler: + - nvcc + +sysroot_version: + - "2.17" + ucx_version: - "1.12.1" + +cmake_version: + - ">=3.20.1,!=3.23.0" \ No newline at end of file diff --git a/conda/recipes/pyraft/meta.yaml b/conda/recipes/pyraft/meta.yaml index 86159622d3..ca89aec042 100644 --- a/conda/recipes/pyraft/meta.yaml +++ b/conda/recipes/pyraft/meta.yaml @@ -23,13 +23,20 @@ build: - CC - CXX - VERSION_SUFFIX + ignore_run_exports_from: + - {{ compiler('cuda') }}+ requirements: build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} + - sysroot_{{ target_platform }} {{ sysroot_version }} + host: - python x.x - setuptools - cython>=0.29,<0.30 - - cmake>=3.20.1,!=3.23.0 + - cmake {{ cmake_version }} - scikit-build>=0.13.1 - rmm {{ minor_version }} - libraft-headers {{ version }} From 4dea2c0bb8ed418185b7e987b3c092b092e752f8 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:15:36 -0400 Subject: [PATCH 12/40] Removing accidental copy --- conda/recipes/libraft/meta.yaml | 6 +++--- conda/recipes/pylibraft/meta.yaml | 2 +- conda/recipes/pyraft/meta.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 7b38cd2681..1d58b26467 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -37,7 +37,7 @@ outputs: - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: @@ -106,7 +106,7 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} @@ -140,7 +140,7 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index 896b4fdc4d..09fecf2963 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -23,7 +23,7 @@ build: - CXX - VERSION_SUFFIX ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: diff --git a/conda/recipes/pyraft/meta.yaml b/conda/recipes/pyraft/meta.yaml index ca89aec042..61a0153b5b 100644 --- a/conda/recipes/pyraft/meta.yaml +++ b/conda/recipes/pyraft/meta.yaml @@ -24,7 +24,7 @@ build: - CXX - VERSION_SUFFIX ignore_run_exports_from: - - {{ compiler('cuda') }}+ + - {{ compiler('cuda') }} requirements: build: From 72ed039233e5b2adfcb7966147f3c816d5ac7edd Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:22:18 -0400 Subject: [PATCH 13/40] Trying again --- conda/recipes/libraft/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 1d58b26467..c0c57e7e5e 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -72,6 +72,8 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: *script_env + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} From 6378adb4324f90fe48599606a6ce44eaa65e0dd5 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:27:43 -0400 Subject: [PATCH 14/40] Moving files --- conda/recipes/libraft/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index c0c57e7e5e..6d86962479 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -36,10 +36,10 @@ outputs: - SCCACHE_BUCKET=rapids-sccache - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 - ignore_run_exports_from: - - {{ compiler('cuda') }} number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + ignore_run_exports_from: + - {{ compiler('cuda') }} requirements: build: - cmake {{ cmake_version }} @@ -71,9 +71,9 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: *script_env ignore_run_exports_from: - {{ compiler('cuda') }} + script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -106,9 +106,9 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: *script_env ignore_run_exports_from: - {{ compiler('cuda') }} + script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -140,9 +140,9 @@ outputs: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: *script_env ignore_run_exports_from: - {{ compiler('cuda') }} + script_env: *script_env requirements: build: - cmake {{ cmake_version }} From b3ee076c8be3372009eb01bd38f84811f1b83427 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:31:45 -0400 Subject: [PATCH 15/40] Ignoring --- conda/recipes/libraft/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 6d86962479..34cdf1102e 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -36,10 +36,10 @@ outputs: - SCCACHE_BUCKET=rapids-sccache - SCCACHE_REGION=us-west-2 - SCCACHE_IDLE_TIMEOUT=32768 - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} +# number: {{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: build: - cmake {{ cmake_version }} @@ -69,7 +69,7 @@ outputs: version: {{ version }} script: build_libraft_distance.sh build: - number: {{ GIT_DESCRIBE_NUMBER }} +# number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} From 49f992abc4317eb6c54b9176a7cc2b93e240ea3e Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:41:53 -0400 Subject: [PATCH 16/40] Moving script env up --- conda/recipes/libraft/meta.yaml | 43 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 34cdf1102e..16bf95642d 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -15,31 +15,33 @@ package: source: git_url: ../../.. +build: + script_env: + - CC + - CXX + - CUDAHOSTCXX + - PARALLEL_LEVEL + - VERSION_SUFFIX + - PROJECT_FLASH + - CMAKE_GENERATOR + - CMAKE_C_COMPILER_LAUNCHER + - CMAKE_CXX_COMPILER_LAUNCHER + - CMAKE_CUDA_COMPILER_LAUNCHER + - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] + - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] + - SCCACHE_BUCKET=rapids-sccache + - SCCACHE_REGION=us-west-2 + - SCCACHE_IDLE_TIMEOUT=32768 + outputs: - name: libraft-headers version: {{ version }} script: build_libraft_headers.sh build: - script_env: &script_env - - CC - - CXX - - CUDAHOSTCXX - - PARALLEL_LEVEL - - VERSION_SUFFIX - - PROJECT_FLASH - - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER - - CMAKE_CXX_COMPILER_LAUNCHER - - CMAKE_CUDA_COMPILER_LAUNCHER - - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - - SCCACHE_BUCKET=rapids-sccache - - SCCACHE_REGION=us-west-2 - - SCCACHE_IDLE_TIMEOUT=32768 -# number: {{ GIT_DESCRIBE_NUMBER }} + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} requirements: build: - cmake {{ cmake_version }} @@ -69,11 +71,10 @@ outputs: version: {{ version }} script: build_libraft_distance.sh build: -# number: {{ GIT_DESCRIBE_NUMBER }} + number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -108,7 +109,6 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - script_env: *script_env requirements: build: - cmake {{ cmake_version }} @@ -142,7 +142,6 @@ outputs: string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - {{ compiler('cuda') }} - script_env: *script_env requirements: build: - cmake {{ cmake_version }} From 914ada4459e87318b902597a5db31e08503c174d Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:47:16 -0400 Subject: [PATCH 17/40] Removing some script env properties --- conda/recipes/libraft/meta.yaml | 3 --- conda/recipes/pylibraft/meta.yaml | 4 ---- conda/recipes/pyraft/meta.yaml | 4 ---- 3 files changed, 11 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 16bf95642d..11f0d1f5de 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -17,9 +17,6 @@ source: build: script_env: - - CC - - CXX - - CUDAHOSTCXX - PARALLEL_LEVEL - VERSION_SUFFIX - PROJECT_FLASH diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index 09fecf2963..176d12127b 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -18,10 +18,6 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - VERSION_SUFFIX ignore_run_exports_from: - {{ compiler('cuda') }} diff --git a/conda/recipes/pyraft/meta.yaml b/conda/recipes/pyraft/meta.yaml index 61a0153b5b..f3ed6b2f18 100644 --- a/conda/recipes/pyraft/meta.yaml +++ b/conda/recipes/pyraft/meta.yaml @@ -19,10 +19,6 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - script_env: - - CC - - CXX - - VERSION_SUFFIX ignore_run_exports_from: - {{ compiler('cuda') }} From af6b28913510a79f65eddaca8ed7765cef225f9c Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 18:53:07 -0400 Subject: [PATCH 18/40] Trying again --- conda/recipes/libraft/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 11f0d1f5de..b893ae50ae 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -41,11 +41,11 @@ outputs: - {{ compiler('cuda') }} requirements: build: - - cmake {{ cmake_version }} - - { { compiler('c') } } - - { { compiler('cxx') } } - - { { compiler('cuda') } } { { cuda_version } } + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - {{ compiler('cuda') }} {{ cuda_version }} - sysroot_{{ target_platform }} {{ sysroot_version }} + - cmake {{ cmake_version }} host: - cudatoolkit {{ cuda_version }}.* - libcusolver {{ libcusolver_version }} From 4deb576dd37b9d66c3480a0b9f6b02345115016c Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 6 Jun 2022 23:44:08 -0400 Subject: [PATCH 19/40] Updates --- build.sh | 1 + ci/gpu/build.sh | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index bdaa607691..d6b340ec0a 100755 --- a/build.sh +++ b/build.sh @@ -165,6 +165,7 @@ fi if hasArg tests || (( ${NUMARGS} == 0 )); then BUILD_TESTS=ON + COMPILE_DIST_LIBRARY=ON ENABLE_NN_DEPENDENCIES=ON COMPILE_NN_LIBRARY=ON CMAKE_TARGET="${CMAKE_TARGET};test_raft" diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 9f8ff3a996..eab3422023 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -47,7 +47,7 @@ conda activate rapids # Install pre-built conda packages from previous CI step gpuci_logger "Install libraft conda packages from CPU job" CONDA_ARTIFACT_PATH="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here -gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn libraft-tests +gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn gpuci_logger "Check compiler versions" python --version @@ -63,6 +63,18 @@ conda list --show-channel-urls # BUILD - Build RAFT tests ################################################################################ +gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" + +export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH + +gpuci_logger "Build C++ and Python targets" +# These should link against the existing shared libs +if hasArg --skip-tests; then + "$WORKSPACE/build.sh" libraft -v +else + "$WORKSPACE/build.sh" libraft tests -v +fi + gpuci_logger "Build and install Python targets" CONDA_BLD_DIR="$WORKSPACE/.conda-bld" gpuci_mamba_retry install boa @@ -73,6 +85,8 @@ gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyra gpuci_logger "sccache stats" sccache --show-stats + + ################################################################################ # TEST - Run GoogleTest and py.tests for RAFT ################################################################################ From bc028d293696bccf86d9502f90b82d26ccd6c793 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 7 Jun 2022 05:46:41 -0400 Subject: [PATCH 20/40] Test raft --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index eab3422023..999a7e8793 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -108,7 +108,7 @@ nvidia-smi gpuci_logger "GoogleTest for raft" cd "$WORKSPACE" -GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" "$CONDA_PREFIX/bin/libraft/gtests/test_raft" +GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" ./test_raft gpuci_logger "Python pytest for pyraft" cd "$WORKSPACE/python/raft/raft/test" From f88a3a525376b29ec9bf744b5936d0f2ef8c263d Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 7 Jun 2022 06:11:26 -0400 Subject: [PATCH 21/40] Enabling sccache in conda recipe --- conda/recipes/libraft/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index b893ae50ae..53630e35ac 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -21,9 +21,9 @@ build: - VERSION_SUFFIX - PROJECT_FLASH - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER - - CMAKE_CXX_COMPILER_LAUNCHER - - CMAKE_CUDA_COMPILER_LAUNCHER + - CMAKE_C_COMPILER_LAUNCHER="sccache" + - CMAKE_CXX_COMPILER_LAUNCHER="sccache" + - CMAKE_CUDA_COMPILER_LAUNCHER="sccache" - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - SCCACHE_BUCKET=rapids-sccache From 088d73c1e8d5322ae45c5d9c70a226e016846f2a Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 7 Jun 2022 10:03:14 -0400 Subject: [PATCH 22/40] changing to the proper directory to run test_raft --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 999a7e8793..81e644f3dd 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -107,7 +107,7 @@ gpuci_logger "Check GPU usage" nvidia-smi gpuci_logger "GoogleTest for raft" -cd "$WORKSPACE" +cd "$WORKSPACE/cpp/build" GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" ./test_raft gpuci_logger "Python pytest for pyraft" From 0a86bcb7969d1534c060db872994c198dc981e2f Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 7 Jun 2022 10:04:12 -0400 Subject: [PATCH 23/40] Adding sccache env vars back --- ci/cpu/build.sh | 7 +++++++ ci/gpu/build.sh | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 687c29029b..8eb89cfa66 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -5,6 +5,13 @@ ######################################### set -e +export CMAKE_CUDA_COMPILER_LAUNCHER="sccache" +export CMAKE_CXX_COMPILER_LAUNCHER="sccache" +export CMAKE_C_COMPILER_LAUNCHER="sccache" +export SCCACHE_S3_KEY_PREFIX="libraft-$(uname -m)" +export SCCACHE_BUCKET="rapids-sccache" +export SCCACHE_REGION="us-west-2" +export SCCACHE_IDLE_TIMEOUT="32768" # Set path and build parallel level # openmpi dir is required on CentOS for finding MPI libs from cmake if [[ -e /etc/os-release ]] && (grep -qi centos /etc/os-release); then diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 81e644f3dd..fc32035dae 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -1,4 +1,6 @@ #!/bin/bash + + # Copyright (c) 2020-2022, NVIDIA CORPORATION. ######################################### # RAFT GPU build and test script for CI # @@ -30,6 +32,14 @@ unset GIT_DESCRIBE_TAG # ucx-py version export UCX_PY_VERSION='0.26.*' +export CMAKE_CUDA_COMPILER_LAUNCHER="sccache" +export CMAKE_CXX_COMPILER_LAUNCHER="sccache" +export CMAKE_C_COMPILER_LAUNCHER="sccache" +export SCCACHE_S3_KEY_PREFIX="libraft-$(uname -m)" +export SCCACHE_BUCKET="rapids-sccache" +export SCCACHE_REGION="us-west-2" +export SCCACHE_IDLE_TIMEOUT="32768" + ################################################################################ # SETUP - Check environment ################################################################################ From 0190e1171a42a42d0bf94a73efae68c362f79465 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 7 Jun 2022 15:30:09 -0400 Subject: [PATCH 24/40] Using proper test path --- ci/gpu/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 4b1bf77797..76a10ee33a 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -107,8 +107,8 @@ gpuci_logger "Check GPU usage" nvidia-smi gpuci_logger "GoogleTest for raft" -cd "$WORKSPACE" -GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" "$CONDA_PREFIX/bin/libraft/gtests/test_raft" +cd "$WORKSPACE/cpp/build" +GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" ./test_raft gpuci_logger "Python pytest for pyraft" cd "$WORKSPACE/python/raft/raft/test" From 7e8d088e05bd27ed857736388f08b1d46cb9c598 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 7 Jun 2022 19:13:42 -0400 Subject: [PATCH 25/40] Removing versions --- ci/gpu/build.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 76a10ee33a..0355f6e5e0 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -51,11 +51,6 @@ gpuci_logger "Install libraft conda packages from CPU job" CONDA_ARTIFACT_PATH="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn -gpuci_logger "Check compiler versions" -python --version -$CC --version -$CXX --version - gpuci_logger "Check conda environment" conda info conda config --show-sources From c05a80a3c362b56881e872e460a12741cf2294bc Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 17:11:53 -0400 Subject: [PATCH 26/40] iUpdates --- ci/gpu/build.sh | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 0355f6e5e0..c8efed023f 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -19,12 +19,14 @@ function hasArg { export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export PARALLEL_LEVEL=${PARALLEL_LEVEL:-8} export CUDA_REL=${CUDA_VERSION%.*} +CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here + # Set home to the job's workspace -export HOME="$WORKSPACE" +export HOME=$WORKSPACE # Parse git describe -cd "$WORKSPACE" +cd $WORKSPACE export GIT_DESCRIBE_TAG=`git describe --tags` export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` unset GIT_DESCRIBE_TAG @@ -46,10 +48,19 @@ gpuci_logger "Activate conda env" . /opt/conda/etc/profile.d/conda.sh conda activate rapids +gpuci_logger "Install dependencies" +gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ + "cudatoolkit=${CUDA_REL}" \ + "cudf=${MINOR_VERSION}" \ + "dask-cudf=${MINOR_VERSION}" \ + "dask-cuda=${MINOR_VERSION}" \ + "ucx-py=${UCX_PY_VERSION}" \ + "ucx-proc=*=gpu" \ + "rapids-build-env=${MINOR_VERSION}.*" + # Install pre-built conda packages from previous CI step gpuci_logger "Install libraft conda packages from CPU job" -CONDA_ARTIFACT_PATH="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here -gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn +gpuci_mamba_retry install -y -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn gpuci_logger "Check conda environment" conda info @@ -64,13 +75,13 @@ gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH -gpuci_logger "Build C++ and Python targets" -# These should link against the existing shared libs -if hasArg --skip-tests; then - "$WORKSPACE/build.sh" libraft -v -else - "$WORKSPACE/build.sh" libraft tests -v -fi +#gpuci_logger "Build C++ and Python targets" +## These should link against the existing shared libs +#if hasArg --skip-tests; then +# "$WORKSPACE/build.sh" libraft -v +#else +# "$WORKSPACE/build.sh" libraft tests -v +#fi gpuci_logger "Build and install Python targets" CONDA_BLD_DIR="$WORKSPACE/.conda-bld" @@ -101,9 +112,17 @@ set +x gpuci_logger "Check GPU usage" nvidia-smi -gpuci_logger "GoogleTest for raft" -cd "$WORKSPACE/cpp/build" -GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" ./test_raft +if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then + gpuci_logger "GoogleTest for raft" + set -x + cd $WORKSPACE/cpp/build + GTEST_OUTPUT="xml:${WORKSPACE}/test-results/raft_cpp/" ./test_raft +else + # Install pre-built conda packages from previous CI step + gpuci_logger "Install libraft conda packages from CPU job" + gpuci_mamba_retry install -y -c "${CONDA_ARTIFACT_PATH}" libraft-tests + GTEST_OUTPUT="xml:${WORKSPACE}/test-results/raft_cpp/" $CONDA_PREFIX/bin/gtests/libraft/test_raft +fi gpuci_logger "Python pytest for pyraft" cd "$WORKSPACE/python/raft/raft/test" @@ -113,6 +132,7 @@ gpuci_logger "Python pytest for pylibraft" cd "$WORKSPACE/python/pylibraft/pylibraft/test" python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pylibraft.xml" -v -s + if [ "$(arch)" = "x86_64" ]; then gpuci_logger "Building docs" gpuci_mamba_retry install "rapids-doc-env=${MINOR_VERSION}.*" From ab6a08ad84e235ec4d73c25d844b7be6f5b3d67d Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 20:54:32 -0400 Subject: [PATCH 27/40] Temporarily removing dense gtests --- ci/gpu/build.sh | 2 +- cpp/test/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index c8efed023f..661b38eb7e 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -121,7 +121,7 @@ else # Install pre-built conda packages from previous CI step gpuci_logger "Install libraft conda packages from CPU job" gpuci_mamba_retry install -y -c "${CONDA_ARTIFACT_PATH}" libraft-tests - GTEST_OUTPUT="xml:${WORKSPACE}/test-results/raft_cpp/" $CONDA_PREFIX/bin/gtests/libraft/test_raft + GTEST_OUTPUT="xml:${WORKSPACE}/test-results/raft_cpp/" $CONDA_PREFIX/bin/libraft/gtests/test_raft fi gpuci_logger "Python pytest for pyraft" diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index 43c6257966..6b44ca5277 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -91,7 +91,7 @@ add_executable(test_raft test/sparse/convert_csr.cu test/sparse/connect_components.cu test/sparse/csr_row_slice.cu - test/sparse/csr_to_dense.cu +# test/sparse/csr_to_dense.cu test/sparse/csr_transpose.cu test/sparse/degree.cu test/sparse/dist_coo_spmv.cu From 903a2d8b259f1e201a76f6951aa4bf2552423f60 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 22:02:30 -0400 Subject: [PATCH 28/40] iEnabling ccache and explicitly setting libcusparse version --- build.sh | 9 ++++++++- conda/recipes/libraft/build_libraft_distance.sh | 2 +- conda/recipes/libraft/build_libraft_headers.sh | 2 +- conda/recipes/libraft/build_libraft_nn.sh | 2 +- conda/recipes/libraft/build_libraft_tests.sh | 2 +- conda/recipes/libraft/conda_build_config.yaml | 3 +++ conda/recipes/libraft/meta.yaml | 7 ++++++- 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index d6b340ec0a..3608b425a7 100755 --- a/build.sh +++ b/build.sh @@ -18,7 +18,7 @@ ARGS=$* # script, and that this script resides in the repo dir! REPODIR=$(cd $(dirname $0); pwd) -VALIDARGS="clean libraft pyraft pylibraft docs tests bench clean -v -g --install --compile-libs --compile-nn --compile-dist --allgpuarch --no-nvtx --show_depr_warn -h --buildfaiss --minimal-deps" +VALIDARGS="clean libraft pyraft pylibraft docs tests bench clean -v -g --install --compile-libs --compile-nn --compile-dist --allgpuarch --ccache --no-nvtx --show_depr_warn -h --buildfaiss --minimal-deps" HELP="$0 [ ...] [ ...] [--cmake-args=\"\"] where is: clean - remove all existing build artifacts and configuration (start over) @@ -33,6 +33,7 @@ HELP="$0 [ ...] [ ...] [--cmake-args=\"\"] and is: -v - verbose build mode -g - build for debug + --ccache - enable ccache --compile-libs - compile shared libraries for all components --compile-nn - compile shared library for nn component --compile-dist - compile shared library for distance component @@ -68,6 +69,7 @@ ENABLE_NN_DEPENDENCIES=OFF ENABLE_thrust_DEPENDENCY=ON +CCACHE_ARGS="" NVTX=ON CLEAN=0 UNINSTALL=0 @@ -132,6 +134,10 @@ if hasArg --install; then INSTALL_TARGET="install" fi +if hasArg --ccache; then + CCACHE_ARGS="-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" +fi + if hasArg --minimal-deps; then ENABLE_thrust_DEPENDENCY=OFF fi @@ -251,6 +257,7 @@ if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || has -DRAFT_COMPILE_DIST_LIBRARY=${COMPILE_DIST_LIBRARY} \ -DRAFT_USE_FAISS_STATIC=${BUILD_STATIC_FAISS} \ -DRAFT_ENABLE_thrust_DEPENDENCY=${ENABLE_thrust_DEPENDENCY} \ + ${CCACHE_ARGS} \ ${EXTRA_CMAKE_ARGS} if [[ ${CMAKE_TARGET} != "" ]]; then diff --git a/conda/recipes/libraft/build_libraft_distance.sh b/conda/recipes/libraft/build_libraft_distance.sh index 35a669d6df..56fce1bd69 100644 --- a/conda/recipes/libraft/build_libraft_distance.sh +++ b/conda/recipes/libraft/build_libraft_distance.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh libraft --install -v --allgpuarch --compile-dist --no-nvtx +./build.sh libraft --install -v --allgpuarch --compile-dist --ccache --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_headers.sh b/conda/recipes/libraft/build_libraft_headers.sh index 02ef674787..ff9ed418c2 100644 --- a/conda/recipes/libraft/build_libraft_headers.sh +++ b/conda/recipes/libraft/build_libraft_headers.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh libraft --install -v --allgpuarch --no-nvtx +./build.sh libraft --install -v --allgpuarch --ccache --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_nn.sh b/conda/recipes/libraft/build_libraft_nn.sh index caa643a356..f8cb348533 100644 --- a/conda/recipes/libraft/build_libraft_nn.sh +++ b/conda/recipes/libraft/build_libraft_nn.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh libraft --install -v --allgpuarch --compile-nn --no-nvtx +./build.sh libraft --install -v --allgpuarch --ccache --compile-nn --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_tests.sh b/conda/recipes/libraft/build_libraft_tests.sh index 040a2f8b8c..219985c37d 100644 --- a/conda/recipes/libraft/build_libraft_tests.sh +++ b/conda/recipes/libraft/build_libraft_tests.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh tests bench -v --allgpuarch --no-nvtx +./build.sh tests bench -v --allgpuarch --ccache --no-nvtx cmake --install cpp/build --component testing diff --git a/conda/recipes/libraft/conda_build_config.yaml b/conda/recipes/libraft/conda_build_config.yaml index da29d0f8ad..bed95d14b3 100644 --- a/conda/recipes/libraft/conda_build_config.yaml +++ b/conda/recipes/libraft/conda_build_config.yaml @@ -22,5 +22,8 @@ gtest_version: libcusolver_version: - ">=11.2.1" +libcusparse_version: + - ">=11.5.0" + libfaiss_version: - "1.7.0 *_cuda" diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 53630e35ac..bf4fec9d3e 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -56,6 +56,7 @@ outputs: run: - cudatoolkit {{ cuda_spec }} - libcusolver {{ libcusolver_version }} + - libcusparse {{ libcusparse_version }} - librmm {{ minor_version }} - nccl {{ nccl_version }} - ucx-proc=*=gpu @@ -88,11 +89,12 @@ outputs: - {{ pin_subpackage('libraft-headers', exact=True) }} run: - cudatoolkit {{ cuda_spec }} - - libcusolver {{ libcusolver_version }} - librmm {{ minor_version }} - nccl {{ nccl_version }} - ucx-proc=*=gpu - ucx-py {{ ucx_py_version }} + - libcusolver {{ libcusolver_version }} + - libcusparse {{ libcusparse_version }} - {{ pin_subpackage('libraft-headers', exact=True) }} about: home: http://rapids.ai/ @@ -124,6 +126,7 @@ outputs: - cudatoolkit {{ cuda_spec }} - faiss-proc=*=cuda - libcusolver {{ libcusolver_version }} + - libcusparse {{ libcusparse_version }} - libfaiss {{ libfaiss_version }} - librmm {{ minor_version }} - {{ pin_subpackage('libraft-headers', exact=True) }} @@ -157,6 +160,8 @@ outputs: - cudatoolkit {{ cuda_spec }} - gmock {{ gtest_version }} - gtest {{ gtest_version }} + - libcusolver {{ libcusolver_version }} + - libcusparse {{ libcusparse_version }} - {{ pin_subpackage('libraft-distance', exact=True) }} - {{ pin_subpackage('libraft-headers', exact=True) }} - {{ pin_subpackage('libraft-nn', exact=True) }} From 602f0d99ec0cf2279c0d58882b9b471369b79d1e Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 22:03:29 -0400 Subject: [PATCH 29/40] Re-enabling csr to dense test --- cpp/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index 6b44ca5277..43c6257966 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -91,7 +91,7 @@ add_executable(test_raft test/sparse/convert_csr.cu test/sparse/connect_components.cu test/sparse/csr_row_slice.cu -# test/sparse/csr_to_dense.cu + test/sparse/csr_to_dense.cu test/sparse/csr_transpose.cu test/sparse/degree.cu test/sparse/dist_coo_spmv.cu From 7408e3a6efab1f3f927a09aedc893244052a4741 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 22:04:38 -0400 Subject: [PATCH 30/40] ienabling ccache in pyraft and pylibraft --- conda/recipes/pylibraft/build.sh | 2 +- conda/recipes/pyraft/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/pylibraft/build.sh b/conda/recipes/pylibraft/build.sh index 4e64d031ec..6948ed072f 100644 --- a/conda/recipes/pylibraft/build.sh +++ b/conda/recipes/pylibraft/build.sh @@ -2,4 +2,4 @@ #!/usr/bin/env bash # This assumes the script is executed from the root of the repo directory -./build.sh pylibraft --install --no-nvtx +./build.sh pylibraft --install --ccache --no-nvtx diff --git a/conda/recipes/pyraft/build.sh b/conda/recipes/pyraft/build.sh index 1462f365ff..fbb5fcaeb8 100644 --- a/conda/recipes/pyraft/build.sh +++ b/conda/recipes/pyraft/build.sh @@ -3,4 +3,4 @@ # Copyright (c) 2022, NVIDIA CORPORATION. # This assumes the script is executed from the root of the repo directory -./build.sh pyraft --install --no-nvtx +./build.sh pyraft --install --ccache --no-nvtx From 235412a4c8f7691ca9b1180bf9c7807b7b4160dd Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 22:24:35 -0400 Subject: [PATCH 31/40] Using sccache --- build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 3608b425a7..d0eebbd010 100755 --- a/build.sh +++ b/build.sh @@ -18,7 +18,7 @@ ARGS=$* # script, and that this script resides in the repo dir! REPODIR=$(cd $(dirname $0); pwd) -VALIDARGS="clean libraft pyraft pylibraft docs tests bench clean -v -g --install --compile-libs --compile-nn --compile-dist --allgpuarch --ccache --no-nvtx --show_depr_warn -h --buildfaiss --minimal-deps" +VALIDARGS="clean libraft pyraft pylibraft docs tests bench clean -v -g --install --compile-libs --compile-nn --compile-dist --allgpuarch --sccache --no-nvtx --show_depr_warn -h --buildfaiss --minimal-deps" HELP="$0 [ ...] [ ...] [--cmake-args=\"\"] where is: clean - remove all existing build artifacts and configuration (start over) @@ -33,7 +33,7 @@ HELP="$0 [ ...] [ ...] [--cmake-args=\"\"] and is: -v - verbose build mode -g - build for debug - --ccache - enable ccache + --sccache - enable sccache --compile-libs - compile shared libraries for all components --compile-nn - compile shared library for nn component --compile-dist - compile shared library for distance component @@ -69,7 +69,7 @@ ENABLE_NN_DEPENDENCIES=OFF ENABLE_thrust_DEPENDENCY=ON -CCACHE_ARGS="" +SCCACHE_ARGS="" NVTX=ON CLEAN=0 UNINSTALL=0 @@ -134,8 +134,8 @@ if hasArg --install; then INSTALL_TARGET="install" fi -if hasArg --ccache; then - CCACHE_ARGS="-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" +if hasArg --sccache; then + SCCACHE_ARGS="-DCMAKE_CUDA_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" fi if hasArg --minimal-deps; then @@ -257,7 +257,7 @@ if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || has -DRAFT_COMPILE_DIST_LIBRARY=${COMPILE_DIST_LIBRARY} \ -DRAFT_USE_FAISS_STATIC=${BUILD_STATIC_FAISS} \ -DRAFT_ENABLE_thrust_DEPENDENCY=${ENABLE_thrust_DEPENDENCY} \ - ${CCACHE_ARGS} \ + ${SCCACHE_ARGS} \ ${EXTRA_CMAKE_ARGS} if [[ ${CMAKE_TARGET} != "" ]]; then From 51188f7b9881892daa65ab5294a88d78b8fee6ca Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 22:26:04 -0400 Subject: [PATCH 32/40] iEnabling sccache --- conda/recipes/libraft/build_libraft_distance.sh | 2 +- conda/recipes/libraft/build_libraft_headers.sh | 2 +- conda/recipes/libraft/build_libraft_nn.sh | 2 +- conda/recipes/libraft/build_libraft_tests.sh | 2 +- conda/recipes/pylibraft/build.sh | 2 +- conda/recipes/pyraft/build.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conda/recipes/libraft/build_libraft_distance.sh b/conda/recipes/libraft/build_libraft_distance.sh index 56fce1bd69..8c44584719 100644 --- a/conda/recipes/libraft/build_libraft_distance.sh +++ b/conda/recipes/libraft/build_libraft_distance.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh libraft --install -v --allgpuarch --compile-dist --ccache --no-nvtx +./build.sh libraft --install -v --allgpuarch --compile-dist --sccache --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_headers.sh b/conda/recipes/libraft/build_libraft_headers.sh index ff9ed418c2..0176dac2f6 100644 --- a/conda/recipes/libraft/build_libraft_headers.sh +++ b/conda/recipes/libraft/build_libraft_headers.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh libraft --install -v --allgpuarch --ccache --no-nvtx +./build.sh libraft --install -v --allgpuarch --sccache --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_nn.sh b/conda/recipes/libraft/build_libraft_nn.sh index f8cb348533..44e9279315 100644 --- a/conda/recipes/libraft/build_libraft_nn.sh +++ b/conda/recipes/libraft/build_libraft_nn.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh libraft --install -v --allgpuarch --ccache --compile-nn --no-nvtx +./build.sh libraft --install -v --allgpuarch --sccache --compile-nn --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_tests.sh b/conda/recipes/libraft/build_libraft_tests.sh index 219985c37d..4e101f541a 100644 --- a/conda/recipes/libraft/build_libraft_tests.sh +++ b/conda/recipes/libraft/build_libraft_tests.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash # Copyright (c) 2022, NVIDIA CORPORATION. -./build.sh tests bench -v --allgpuarch --ccache --no-nvtx +./build.sh tests bench -v --allgpuarch --sccache --no-nvtx cmake --install cpp/build --component testing diff --git a/conda/recipes/pylibraft/build.sh b/conda/recipes/pylibraft/build.sh index 6948ed072f..558d6fb071 100644 --- a/conda/recipes/pylibraft/build.sh +++ b/conda/recipes/pylibraft/build.sh @@ -2,4 +2,4 @@ #!/usr/bin/env bash # This assumes the script is executed from the root of the repo directory -./build.sh pylibraft --install --ccache --no-nvtx +./build.sh pylibraft --install --sccache --no-nvtx diff --git a/conda/recipes/pyraft/build.sh b/conda/recipes/pyraft/build.sh index fbb5fcaeb8..b290d4463c 100644 --- a/conda/recipes/pyraft/build.sh +++ b/conda/recipes/pyraft/build.sh @@ -3,4 +3,4 @@ # Copyright (c) 2022, NVIDIA CORPORATION. # This assumes the script is executed from the root of the repo directory -./build.sh pyraft --install --ccache --no-nvtx +./build.sh pyraft --install --sccache --no-nvtx From 76e08859dcb2ee30aee4c1f47101f8aa877e068a Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 13 Jun 2022 22:30:21 -0400 Subject: [PATCH 33/40] iAdding libcusparse to host dependencies in libraft-headers --- conda/recipes/libraft/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index bf4fec9d3e..043244705f 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -49,6 +49,7 @@ outputs: host: - cudatoolkit {{ cuda_version }}.* - libcusolver {{ libcusolver_version }} + - libcusparse {{ libcusparse_version }} - librmm {{ minor_version }} - nccl {{ nccl_version }} - ucx-proc=*=gpu From 410e36ad4ee6a71c60515380485a77f802ce6af1 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 10:49:37 -0400 Subject: [PATCH 34/40] Fixes --- ci/gpu/build.sh | 12 +----------- conda/recipes/libraft/meta.yaml | 3 --- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 661b38eb7e..6c5ffb51f6 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -48,16 +48,6 @@ gpuci_logger "Activate conda env" . /opt/conda/etc/profile.d/conda.sh conda activate rapids -gpuci_logger "Install dependencies" -gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ - "cudatoolkit=${CUDA_REL}" \ - "cudf=${MINOR_VERSION}" \ - "dask-cudf=${MINOR_VERSION}" \ - "dask-cuda=${MINOR_VERSION}" \ - "ucx-py=${UCX_PY_VERSION}" \ - "ucx-proc=*=gpu" \ - "rapids-build-env=${MINOR_VERSION}.*" - # Install pre-built conda packages from previous CI step gpuci_logger "Install libraft conda packages from CPU job" gpuci_mamba_retry install -y -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn @@ -88,7 +78,7 @@ CONDA_BLD_DIR="$WORKSPACE/.conda-bld" gpuci_mamba_retry install boa gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" -gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft +gpuci_mamba_retry install -y -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft gpuci_logger "sccache stats" sccache --show-stats diff --git a/conda/recipes/libraft/meta.yaml b/conda/recipes/libraft/meta.yaml index 043244705f..348ae66645 100644 --- a/conda/recipes/libraft/meta.yaml +++ b/conda/recipes/libraft/meta.yaml @@ -21,9 +21,6 @@ build: - VERSION_SUFFIX - PROJECT_FLASH - CMAKE_GENERATOR - - CMAKE_C_COMPILER_LAUNCHER="sccache" - - CMAKE_CXX_COMPILER_LAUNCHER="sccache" - - CMAKE_CUDA_COMPILER_LAUNCHER="sccache" - SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] - SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] - SCCACHE_BUCKET=rapids-sccache From 5a9d8dd2481c6b0b6a71e5db5d1d4813915149fc Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 11:10:49 -0400 Subject: [PATCH 35/40] Building pyraft and pylibraft in gpu build after tests (just for docs) --- ci/gpu/build.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 6c5ffb51f6..eef074bb89 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -19,7 +19,8 @@ function hasArg { export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export PARALLEL_LEVEL=${PARALLEL_LEVEL:-8} export CUDA_REL=${CUDA_VERSION%.*} -CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here +export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here +export CONDA_BLD_DIR="$WORKSPACE/.conda-bld" # Set home to the job's workspace @@ -74,10 +75,6 @@ export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH #fi gpuci_logger "Build and install Python targets" -CONDA_BLD_DIR="$WORKSPACE/.conda-bld" -gpuci_mamba_retry install boa -gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" -gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_mamba_retry install -y -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft gpuci_logger "sccache stats" @@ -125,6 +122,8 @@ python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pylibraft.xml" -v -s if [ "$(arch)" = "x86_64" ]; then gpuci_logger "Building docs" + gpuci_mamba_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" + gpuci_mamba_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_mamba_retry install "rapids-doc-env=${MINOR_VERSION}.*" "$WORKSPACE/build.sh" docs -v fi From 6b2ef92e31c1a5230f61f8db29a8c59813d1d63a Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 11:12:04 -0400 Subject: [PATCH 36/40] iMore cleanup --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index eef074bb89..ea26e5b76b 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -20,7 +20,7 @@ export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export PARALLEL_LEVEL=${PARALLEL_LEVEL:-8} export CUDA_REL=${CUDA_VERSION%.*} export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here -export CONDA_BLD_DIR="$WORKSPACE/.conda-bld" +export CONDA_BLD_DIR=${WORKSPACE}/.conda-bld # Set home to the job's workspace From a8929ffd7738e4826ebfde0a2bdfd10bf8605fd3 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 11:14:38 -0400 Subject: [PATCH 37/40] iRemoving explicit build --- ci/gpu/build.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index ea26e5b76b..cfe122f827 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -66,14 +66,6 @@ gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH -#gpuci_logger "Build C++ and Python targets" -## These should link against the existing shared libs -#if hasArg --skip-tests; then -# "$WORKSPACE/build.sh" libraft -v -#else -# "$WORKSPACE/build.sh" libraft tests -v -#fi - gpuci_logger "Build and install Python targets" gpuci_mamba_retry install -y -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft From 0c06f3030b8037614cfcef4d66cde746e6bc3b87 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 15:03:56 -0400 Subject: [PATCH 38/40] Explicitly building python packages. --- ci/gpu/build.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index cfe122f827..6c5ffb51f6 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -19,8 +19,7 @@ function hasArg { export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH export PARALLEL_LEVEL=${PARALLEL_LEVEL:-8} export CUDA_REL=${CUDA_VERSION%.*} -export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here -export CONDA_BLD_DIR=${WORKSPACE}/.conda-bld +CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/raft/cpu/.conda-bld/ # notice there is no `linux-64` here # Set home to the job's workspace @@ -66,7 +65,19 @@ gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH +#gpuci_logger "Build C++ and Python targets" +## These should link against the existing shared libs +#if hasArg --skip-tests; then +# "$WORKSPACE/build.sh" libraft -v +#else +# "$WORKSPACE/build.sh" libraft tests -v +#fi + gpuci_logger "Build and install Python targets" +CONDA_BLD_DIR="$WORKSPACE/.conda-bld" +gpuci_mamba_retry install boa +gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_mamba_retry install -y -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft gpuci_logger "sccache stats" @@ -114,8 +125,6 @@ python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pylibraft.xml" -v -s if [ "$(arch)" = "x86_64" ]; then gpuci_logger "Building docs" - gpuci_mamba_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" - gpuci_mamba_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_mamba_retry install "rapids-doc-env=${MINOR_VERSION}.*" "$WORKSPACE/build.sh" docs -v fi From 0709f1996899d77b004d9c76bf05ced3dfc3d4f7 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 19:25:11 -0400 Subject: [PATCH 39/40] iBuilding pyraft and pylibraft in cpu job --- ci/cpu/build.sh | 3 --- ci/cpu/prebuild.sh | 5 +++-- ci/cpu/upload.sh | 2 +- ci/gpu/build.sh | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 202725a97b..d7bc122f92 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -5,9 +5,6 @@ ######################################### set -e -export CMAKE_CUDA_COMPILER_LAUNCHER="sccache" -export CMAKE_CXX_COMPILER_LAUNCHER="sccache" -export CMAKE_C_COMPILER_LAUNCHER="sccache" export SCCACHE_S3_KEY_PREFIX="libraft-$(uname -m)" export SCCACHE_BUCKET="rapids-sccache" export SCCACHE_REGION="us-west-2" diff --git a/ci/cpu/prebuild.sh b/ci/cpu/prebuild.sh index 0364394423..ea12bf8b35 100755 --- a/ci/cpu/prebuild.sh +++ b/ci/cpu/prebuild.sh @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +export UPLOAD_RAFT=1 +export UPLOAD_LIBRAFT=1 + if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then #If project flash is not activate, always build both export BUILD_RAFT=1 export BUILD_LIBRAFT=1 fi - -export UPLOAD_LIBRAFT=1 diff --git a/ci/cpu/upload.sh b/ci/cpu/upload.sh index dfd6ea3986..305a0eb861 100755 --- a/ci/cpu/upload.sh +++ b/ci/cpu/upload.sh @@ -37,7 +37,7 @@ if [[ "$BUILD_LIBRAFT" == "1" && "$UPLOAD_LIBRAFT" == "1" ]]; then gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing --no-progress ${LIBRAFT_FILES} fi -if [[ "$BUILD_RAFT" == "1" ]]; then +if [[ "$BUILD_RAFT" == "1" && "$UPLOAD_RAFT" == "1" ]]; then PYRAFT_FILE=$(conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/pyraft --python=$PYTHON --output) PYLIBRAFT_FILE=$(conda build --no-build-id --croot ${CONDA_BLD_DIR} -c ${CONDA_LOCAL_CHANNEL} conda/recipes/pylibraft --python=$PYTHON --output) test -e ${PYRAFT_FILE} diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 6c5ffb51f6..ac76aa85a3 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -76,8 +76,8 @@ export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH gpuci_logger "Build and install Python targets" CONDA_BLD_DIR="$WORKSPACE/.conda-bld" gpuci_mamba_retry install boa -gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" -gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +#gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +#gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_mamba_retry install -y -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft gpuci_logger "sccache stats" From 4eb599324200d3ff4570c3896694c98e3eb1e221 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 14 Jun 2022 19:26:53 -0400 Subject: [PATCH 40/40] iUpates --- ci/gpu/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index ac76aa85a3..6c5ffb51f6 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -76,8 +76,8 @@ export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH gpuci_logger "Build and install Python targets" CONDA_BLD_DIR="$WORKSPACE/.conda-bld" gpuci_mamba_retry install boa -#gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" -#gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" +gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" gpuci_mamba_retry install -y -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft gpuci_logger "sccache stats"