From 1e7b5c8605472e9e433ad1a5a84da86602f1933e Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Thu, 5 Oct 2023 23:19:46 -0400 Subject: [PATCH] Seeing if this fixes the devcontainers --- .../environments/bench_ann_cuda-118_arch-x86_64.yaml | 1 - .../raft-ann-bench-cpu/conda_build_config.yaml | 3 --- conda/recipes/raft-ann-bench-cpu/meta.yaml | 2 -- conda/recipes/raft-ann-bench/conda_build_config.yaml | 3 --- conda/recipes/raft-ann-bench/meta.yaml | 10 ---------- cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp | 12 ++++++------ cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h | 2 ++ cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h | 2 ++ dependencies.yaml | 7 ------- 9 files changed, 10 insertions(+), 32 deletions(-) diff --git a/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml b/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml index c6e298dcd2..4e33ee435f 100644 --- a/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml +++ b/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml @@ -29,7 +29,6 @@ dependencies: - libcusolver=11.4.1.48 - libcusparse-dev=11.7.5.86 - libcusparse=11.7.5.86 -- libfaiss-avx2=1.7.4 - nccl>=2.9.9 - ninja - nlohmann_json>=3.11.2 diff --git a/conda/recipes/raft-ann-bench-cpu/conda_build_config.yaml b/conda/recipes/raft-ann-bench-cpu/conda_build_config.yaml index 1f8ac137bf..0bd424f85b 100644 --- a/conda/recipes/raft-ann-bench-cpu/conda_build_config.yaml +++ b/conda/recipes/raft-ann-bench-cpu/conda_build_config.yaml @@ -10,9 +10,6 @@ sysroot_version: cmake_version: - ">=3.26.4" -faiss_version: - - "1.7.4" - glog_version: - ">=0.6.0" diff --git a/conda/recipes/raft-ann-bench-cpu/meta.yaml b/conda/recipes/raft-ann-bench-cpu/meta.yaml index 7df2c60f7e..71571465c1 100644 --- a/conda/recipes/raft-ann-bench-cpu/meta.yaml +++ b/conda/recipes/raft-ann-bench-cpu/meta.yaml @@ -47,7 +47,6 @@ requirements: host: - glog {{ glog_version }} - matplotlib -# - faiss-cpu {{ faiss_version }} - nlohmann_json {{ nlohmann_json_version }} - python - pyyaml @@ -56,7 +55,6 @@ requirements: run: - glog {{ glog_version }} - h5py {{ h5py_version }} -# - faiss-cpu {{ faiss_version }} - matplotlib - python - pyyaml diff --git a/conda/recipes/raft-ann-bench/conda_build_config.yaml b/conda/recipes/raft-ann-bench/conda_build_config.yaml index 335ca82e89..da0b893c1d 100644 --- a/conda/recipes/raft-ann-bench/conda_build_config.yaml +++ b/conda/recipes/raft-ann-bench/conda_build_config.yaml @@ -25,9 +25,6 @@ gtest_version: glog_version: - ">=0.6.0" -faiss_version: - - "1.7.4" - h5py_version: - ">=3.8.0" diff --git a/conda/recipes/raft-ann-bench/meta.yaml b/conda/recipes/raft-ann-bench/meta.yaml index 2270460df6..1c6fa5723b 100644 --- a/conda/recipes/raft-ann-bench/meta.yaml +++ b/conda/recipes/raft-ann-bench/meta.yaml @@ -70,11 +70,6 @@ requirements: {% endif %} - glog {{ glog_version }} - nlohmann_json {{ nlohmann_json_version }} - # Temporarily ignore faiss benchmarks on CUDA 12 because packages do not exist yet -# {% if cuda_major == "11" %} -# - faiss-proc=*=cuda -# - libfaiss {{ faiss_version }} -# {% endif %} - h5py {{ h5py_version }} - benchmark - matplotlib @@ -92,11 +87,6 @@ requirements: - cudatoolkit {% endif %} - glog {{ glog_version }} - # Temporarily ignore faiss benchmarks on CUDA 12 because packages do not exist yet -# {% if cuda_major == "11" %} -# - faiss-proc=*=cuda -# - libfaiss {{ faiss_version }} -# {% endif %} - h5py {{ h5py_version }} - benchmark - glog {{ glog_version }} diff --git a/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp b/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp index f11df605ee..97d1bbf307 100644 --- a/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp +++ b/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp @@ -116,13 +116,13 @@ std::unique_ptr> create_algo(const std::string& algo, if constexpr (std::is_same_v) { raft::bench::ann::Metric metric = parse_metric(distance); - if (algo == "faiss_gpu_ivf_flat") { + if (algo == "faiss_cpu_ivf_flat") { ann = make_algo(metric, dim, conf, dev_list); - } else if (algo == "faiss_gpu_ivf_pq") { + } else if (algo == "faiss_cpu_ivf_pq") { ann = make_algo(metric, dim, conf); - } else if (algo == "faiss_gpu_ivf_sq") { + } else if (algo == "faiss_cpu_ivf_sq") { ann = make_algo(metric, dim, conf); - } else if (algo == "faiss_gpu_flat") { + } else if (algo == "faiss_cpu_flat") { ann = std::make_unique>(metric, dim); } } @@ -138,11 +138,11 @@ template std::unique_ptr::AnnSearchParam> create_search_param( const std::string& algo, const nlohmann::json& conf) { - if (algo == "faiss_gpu_ivf_flat" || algo == "faiss_gpu_ivf_pq" || algo == "faiss_gpu_ivf_sq") { + if (algo == "faiss_cpu_ivf_flat" || algo == "faiss_cpu_ivf_pq" || algo == "faiss_cpu_ivf_sq") { auto param = std::make_unique::SearchParam>(); parse_search_param(conf, *param); return param; - } else if (algo == "faiss_gpu_flat") { + } else if (algo == "faiss_cpu_flat") { auto param = std::make_unique::AnnSearchParam>(); return param; } diff --git a/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h b/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h index a703fa9950..028a444530 100644 --- a/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h +++ b/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h @@ -248,6 +248,8 @@ class FaissCpuIVFPQ : public FaissCpu { void load(const std::string& file) override { this->template load_(file); } }; +// TODO: Enable this in cmake +// ref: https://github.com/rapidsai/raft/issues/1876 template class FaissCpuIVFSQ : public FaissCpu { public: diff --git a/cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h b/cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h index 6144f89bd4..38eeddf813 100644 --- a/cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h +++ b/cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h @@ -311,6 +311,8 @@ class FaissGpuIVFPQ : public FaissGpu { } }; +// TODO: Enable this in cmake +// ref: https://github.com/rapidsai/raft/issues/1876 template class FaissGpuIVFSQ : public FaissGpu { public: diff --git a/dependencies.yaml b/dependencies.yaml index c8bdfe6da7..b9df7d34c3 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -227,13 +227,6 @@ dependencies: - h5py>=3.8.0 - benchmark>=1.8.2 - rmm=23.10.* - specific: - - output_types: [conda, pyproject, requirements] - matrices: - - matrix: - arch: x86_64 - packages: - - libfaiss-avx2=1.7.4 nn_bench_python: common: - output_types: [conda]