From 0c07a114ad9edd44af6dc00af2f5ae42d6f2bfad Mon Sep 17 00:00:00 2001 From: Gergely Szilvasy Date: Wed, 1 Nov 2023 14:37:21 -0700 Subject: [PATCH] fix raft contbuild and switch to libraft 23.12 (#3116) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3116 Test Plan: https://app.circleci.com/pipelines/github/facebookresearch/faiss/4839/workflows/cfd84a94-ca60-4128-96e6-db0f5afc69c4 Reviewed By: mdouze Differential Revision: D50897934 Pulled By: algoriddle fbshipit-source-id: 1422be39d640a2aec3ab6b4c68d3ef54900b5ba2 --- .circleci/config.yml | 12 ++++++------ cmake/thirdparty/fetch_rapids.cmake | 2 +- conda/faiss-gpu-raft/meta.yaml | 10 ++++++---- conda/faiss-gpu/meta.yaml | 3 ++- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f1ddf1ee3b..9ddcb5ba83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ executors: environment: CONDA_ARCH: Linux-x86_64 machine: - image: linux-cuda-11:2023.02.1 + image: linux-cuda-11:default resource_class: gpu.nvidia.medium linux-arm64-cpu: environment: @@ -91,7 +91,7 @@ jobs: - run: name: Install conda build tools command: | - conda config --set solver libmamba + # conda config --set solver libmamba # conda config --set verbosity 3 conda update -y -q conda conda install -y -q conda-build @@ -171,7 +171,7 @@ jobs: sudo update-alternatives --set cuda /usr/local/cuda-<> cd conda conda build faiss-gpu-raft --variants '{ "cudatoolkit": "<>", "c_compiler_version": "<>", "cxx_compiler_version": "<>" }' \ - -c pytorch -c nvidia -c rapidsai -c conda-forge + -c pytorch -c nvidia -c rapidsai-nightly -c conda-forge - when: condition: and: @@ -186,7 +186,7 @@ jobs: sudo update-alternatives --set cuda /usr/local/cuda-<> cd conda conda build faiss-gpu-raft --variants '{ "cudatoolkit": "<>", "c_compiler_version": "<>", "cxx_compiler_version": "<>" }' \ - --user pytorch --label <> -c pytorch -c nvidia -c rapidsai -c conda-forge + --user pytorch --label <> -c pytorch -c nvidia -c rapidsai-nightly -c conda-forge build_cmake: parameters: @@ -236,7 +236,7 @@ jobs: - run: name: Install libraft command: | - conda install -y -q libraft cudatoolkit=11.4 -c rapidsai-nightly -c nvidia -c pkgs/main -c conda-forge + conda install -y -q libraft cuda-version=11.4 -c rapidsai-nightly -c nvidia -c pkgs/main -c conda-forge - run: name: Build all targets no_output_timeout: 30m @@ -283,7 +283,7 @@ jobs: - run: name: Python tests (CPU + GPU) command: | - conda install -y -q pytorch pytorch-cuda -c pytorch -c nvidia + conda install -y -q pytorch pytorch-cuda=11 -c pytorch -c nvidia pytest --junitxml=test-results/pytest/results.xml tests/test_*.py pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py cp tests/common_faiss_tests.py faiss/gpu/test diff --git a/cmake/thirdparty/fetch_rapids.cmake b/cmake/thirdparty/fetch_rapids.cmake index 229c488196..32ec15b6a4 100644 --- a/cmake/thirdparty/fetch_rapids.cmake +++ b/cmake/thirdparty/fetch_rapids.cmake @@ -15,7 +15,7 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= -set(RAPIDS_VERSION "23.08") +set(RAPIDS_VERSION "23.12") if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/FAISS_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-${RAPIDS_VERSION}/RAPIDS.cmake diff --git a/conda/faiss-gpu-raft/meta.yaml b/conda/faiss-gpu-raft/meta.yaml index 14a5c606b1..387f8b4ac0 100644 --- a/conda/faiss-gpu-raft/meta.yaml +++ b/conda/faiss-gpu-raft/meta.yaml @@ -47,13 +47,13 @@ outputs: host: - mkl =2023 # [x86_64] - openblas # [not x86_64] - - cudatoolkit {{ cudatoolkit }} - - libraft =23.08 + - cuda-version {{ cudatoolkit }} + - libraft =23.12 run: - mkl =2023 # [x86_64] - openblas # [not x86_64] - - {{ pin_compatible('cudatoolkit', max_pin='x.x') }} - - libraft =23.08 + - {{ pin_compatible('cuda-version', max_pin='x') }} + - libraft =23.12 test: requires: - conda-build @@ -90,6 +90,8 @@ outputs: - numpy - scipy - pytorch + - pytorch-cuda =11.8 + - cuda-version =11.8 commands: - python -X faulthandler -m unittest discover -v -s tests/ -p "test_*" - python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*" diff --git a/conda/faiss-gpu/meta.yaml b/conda/faiss-gpu/meta.yaml index fcfd3b4bd2..ee9aca6193 100644 --- a/conda/faiss-gpu/meta.yaml +++ b/conda/faiss-gpu/meta.yaml @@ -51,7 +51,7 @@ outputs: run: - mkl =2023 # [x86_64] - openblas # [not x86_64] - - {{ pin_compatible('cudatoolkit', max_pin='x.x') }} + - {{ pin_compatible('cudatoolkit', max_pin='x') }} test: requires: - conda-build @@ -88,6 +88,7 @@ outputs: - numpy - scipy - pytorch + - pytorch-cuda =11.8 commands: - python -X faulthandler -m unittest discover -v -s tests/ -p "test_*" - python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*"