From 99ed3458d1caec40a5935d960dc50adeb858c961 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 10 Oct 2023 22:10:42 +0200 Subject: [PATCH] Adding FAISS cpu to `raft-ann-bench` (#1814) Closes https://github.com/rapidsai/raft/issues/1813 This PR adds FAISS CPU indexes to the raft-Ann-bench benchmarks, and adjusts the build accordingly. In addition, this PR also updated the FAISS version to include the RAFT-enabled version, which required removing the FAISS conda packages and building FAISS from source. Authors: - Corey J. Nolet (https://github.com/cjnolet) - Robert Maynard (https://github.com/robertmaynard) - Dante Gama Dessavre (https://github.com/dantegd) Approvers: - Divye Gala (https://github.com/divyegala) - Ray Douglass (https://github.com/raydouglass) URL: https://github.com/rapidsai/raft/pull/1814 --- .../bench_ann_cuda-118_arch-x86_64.yaml | 3 +- conda/recipes/libraft/build_libraft.sh | 2 +- .../recipes/libraft/build_libraft_headers.sh | 2 +- .../recipes/libraft/build_libraft_template.sh | 2 +- conda/recipes/libraft/build_libraft_tests.sh | 2 +- conda/recipes/raft-ann-bench-cpu/meta.yaml | 3 +- conda/recipes/raft-ann-bench/build.sh | 2 +- .../raft-ann-bench/conda_build_config.yaml | 3 - conda/recipes/raft-ann-bench/meta.yaml | 10 - cpp/bench/ann/CMakeLists.txt | 112 +++++-- cpp/bench/ann/src/common/thread_pool.hpp | 131 ++++++++ .../ann/src/faiss/faiss_cpu_benchmark.cpp | 162 +++++++++ cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h | 313 ++++++++++++++++++ ...ss_benchmark.cu => faiss_gpu_benchmark.cu} | 2 +- .../{faiss_wrapper.h => faiss_gpu_wrapper.h} | 87 +++-- .../ann/src/hnswlib/hnswlib_benchmark.cpp | 1 - cpp/bench/ann/src/hnswlib/hnswlib_wrapper.h | 110 +----- cpp/bench/ann/src/raft/raft_benchmark.cu | 2 +- cpp/bench/ann/src/raft/raft_cagra_wrapper.h | 27 +- .../ann/src/raft/raft_ivf_flat_wrapper.h | 1 - cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h | 4 +- cpp/bench/ann/src/raft/raft_wrapper.h | 2 + cpp/cmake/thirdparty/get_faiss.cmake | 48 ++- cpp/cmake/thirdparty/get_fmt.cmake | 22 ++ cpp/cmake/thirdparty/get_spdlog.cmake | 33 ++ dependencies.yaml | 3 +- docs/source/ann_benchmarks_param_tuning.md | 41 +++ docs/source/raft_ann_benchmarks.md | 13 +- .../src/raft-ann-bench/run/algos.yaml | 27 +- .../raft-ann-bench/run/conf/deep-100M.json | 28 +- .../src/raft-ann-bench/run/conf/deep-1B.json | 4 +- .../run/conf/deep-image-96-inner.json | 108 +++--- .../run/conf/fashion-mnist-784-euclidean.json | 108 +++--- .../run/conf/gist-960-euclidean.json | 108 +++--- .../run/conf/glove-100-angular.json | 108 +++--- .../run/conf/glove-100-inner.json | 146 +++----- .../run/conf/glove-50-angular.json | 108 +++--- .../run/conf/lastfm-65-angular.json | 108 +++--- .../run/conf/mnist-784-euclidean.json | 108 +++--- .../run/conf/nytimes-256-angular.json | 108 +++--- .../run/conf/sift-128-euclidean.json | 72 ++-- 41 files changed, 1484 insertions(+), 800 deletions(-) create mode 100644 cpp/bench/ann/src/common/thread_pool.hpp create mode 100644 cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp create mode 100644 cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h rename cpp/bench/ann/src/faiss/{faiss_benchmark.cu => faiss_gpu_benchmark.cu} (99%) rename cpp/bench/ann/src/faiss/{faiss_wrapper.h => faiss_gpu_wrapper.h} (79%) create mode 100644 cpp/cmake/thirdparty/get_fmt.cmake create mode 100644 cpp/cmake/thirdparty/get_spdlog.cmake 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 2527fdd1fc..2c92ad0a99 100644 --- a/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml +++ b/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml @@ -17,7 +17,6 @@ dependencies: - cudatoolkit - cxx-compiler - cython>=3.0.0 -- faiss-proc=*=cuda - gcc_linux-64=11.* - glog>=0.6.0 - h5py>=3.8.0 @@ -30,12 +29,12 @@ dependencies: - libcusolver=11.4.1.48 - libcusparse-dev=11.7.5.86 - libcusparse=11.7.5.86 -- libfaiss>=1.7.1 - matplotlib - nccl>=2.9.9 - ninja - nlohmann_json>=3.11.2 - nvcc_linux-64=11.8 +- openblas - pandas - pyyaml - rmm==23.12.* diff --git a/conda/recipes/libraft/build_libraft.sh b/conda/recipes/libraft/build_libraft.sh index 71e1533893..7d4173e8bb 100644 --- a/conda/recipes/libraft/build_libraft.sh +++ b/conda/recipes/libraft/build_libraft.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Copyright (c) 2022-2023, NVIDIA CORPORATION. -./build.sh libraft -v --allgpuarch --compile-lib --build-metrics=compile_lib --incl-cache-stats --no-nvtx +./build.sh libraft --allgpuarch --compile-lib --build-metrics=compile_lib --incl-cache-stats --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_headers.sh b/conda/recipes/libraft/build_libraft_headers.sh index 330ac92ff3..cc3b840e43 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-2023, NVIDIA CORPORATION. -./build.sh libraft -v --allgpuarch --no-nvtx +./build.sh libraft --allgpuarch --no-nvtx diff --git a/conda/recipes/libraft/build_libraft_template.sh b/conda/recipes/libraft/build_libraft_template.sh index 974b0a5b58..bd7719af76 100644 --- a/conda/recipes/libraft/build_libraft_template.sh +++ b/conda/recipes/libraft/build_libraft_template.sh @@ -2,4 +2,4 @@ # Copyright (c) 2022-2023, NVIDIA CORPORATION. # Just building template so we verify it uses libraft.so and fail if it doesn't build -./build.sh template -v +./build.sh template diff --git a/conda/recipes/libraft/build_libraft_tests.sh b/conda/recipes/libraft/build_libraft_tests.sh index 08f0d33485..05a2b59eb0 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-2023, NVIDIA CORPORATION. -./build.sh tests bench-prims -v --allgpuarch --no-nvtx --build-metrics=tests_bench_prims --incl-cache-stats +./build.sh tests bench-prims --allgpuarch --no-nvtx --build-metrics=tests_bench_prims --incl-cache-stats cmake --install cpp/build --component testing diff --git a/conda/recipes/raft-ann-bench-cpu/meta.yaml b/conda/recipes/raft-ann-bench-cpu/meta.yaml index 06737b0497..71571465c1 100644 --- a/conda/recipes/raft-ann-bench-cpu/meta.yaml +++ b/conda/recipes/raft-ann-bench-cpu/meta.yaml @@ -60,8 +60,7 @@ requirements: - pyyaml - pandas - benchmark - about: home: https://rapids.ai/ license: Apache-2.0 - summary: libraft ann bench + summary: RAFT ANN CPU benchmarks diff --git a/conda/recipes/raft-ann-bench/build.sh b/conda/recipes/raft-ann-bench/build.sh index 9c411774b6..00078792a1 100644 --- a/conda/recipes/raft-ann-bench/build.sh +++ b/conda/recipes/raft-ann-bench/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash # Copyright (c) 2023, NVIDIA CORPORATION. -./build.sh bench-ann -v --allgpuarch --no-nvtx --build-metrics=bench_ann --incl-cache-stats +./build.sh bench-ann --allgpuarch --no-nvtx --build-metrics=bench_ann --incl-cache-stats cmake --install cpp/build --component ann_bench diff --git a/conda/recipes/raft-ann-bench/conda_build_config.yaml b/conda/recipes/raft-ann-bench/conda_build_config.yaml index d156f2609b..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.1" - h5py_version: - ">=3.8.0" diff --git a/conda/recipes/raft-ann-bench/meta.yaml b/conda/recipes/raft-ann-bench/meta.yaml index a2ab0af643..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/CMakeLists.txt b/cpp/bench/ann/CMakeLists.txt index 8985be328b..502f371a25 100644 --- a/cpp/bench/ann/CMakeLists.txt +++ b/cpp/bench/ann/CMakeLists.txt @@ -15,9 +15,18 @@ # ################################################################################################## # * benchmark options ------------------------------------------------------------------------------ -option(RAFT_ANN_BENCH_USE_FAISS_BFKNN "Include faiss' brute-force knn algorithm in benchmark" ON) -option(RAFT_ANN_BENCH_USE_FAISS_IVF_FLAT "Include faiss' ivf flat algorithm in benchmark" ON) -option(RAFT_ANN_BENCH_USE_FAISS_IVF_PQ "Include faiss' ivf pq algorithm in benchmark" ON) +option(RAFT_ANN_BENCH_USE_FAISS_GPU_FLAT "Include faiss' brute-force knn algorithm in benchmark" ON) +option(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT "Include faiss' ivf flat algorithm in benchmark" ON) +option(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_PQ "Include faiss' ivf pq algorithm in benchmark" ON) +option(RAFT_ANN_BENCH_USE_FAISS_CPU_FLAT + "Include faiss' cpu brute-force knn algorithm in benchmark" ON +) +option(RAFT_ANN_BENCH_USE_FAISS_CPU_FLAT "Include faiss' cpu brute-force algorithm in benchmark" ON) + +option(RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT "Include faiss' cpu ivf flat algorithm in benchmark" + ON +) +option(RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_PQ "Include faiss' cpu ivf pq algorithm in benchmark" ON) option(RAFT_ANN_BENCH_USE_RAFT_IVF_FLAT "Include raft's ivf flat algorithm in benchmark" ON) option(RAFT_ANN_BENCH_USE_RAFT_IVF_PQ "Include raft's ivf pq algorithm in benchmark" ON) option(RAFT_ANN_BENCH_USE_RAFT_CAGRA "Include raft's CAGRA in benchmark" ON) @@ -33,9 +42,15 @@ option(RAFT_ANN_BENCH_SINGLE_EXE find_package(Threads REQUIRED) if(BUILD_CPU_ONLY) - set(RAFT_ANN_BENCH_USE_FAISS_BFKNN OFF) - set(RAFT_ANN_BENCH_USE_FAISS_IVF_FLAT OFF) - set(RAFT_ANN_BENCH_USE_FAISS_IVF_PQ OFF) + + # Include necessary logging dependencies + include(cmake/thirdparty/get_fmt.cmake) + include(cmake/thirdparty/get_spdlog.cmake) + + set(RAFT_FAISS_ENABLE_GPU OFF) + set(RAFT_ANN_BENCH_USE_FAISS_GPU_FLAT OFF) + set(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT OFF) + set(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_PQ OFF) set(RAFT_ANN_BENCH_USE_RAFT_IVF_FLAT OFF) set(RAFT_ANN_BENCH_USE_RAFT_IVF_PQ OFF) set(RAFT_ANN_BENCH_USE_RAFT_CAGRA OFF) @@ -44,22 +59,33 @@ else() # Disable faiss benchmarks on CUDA 12 since faiss is not yet CUDA 12-enabled. # https://github.com/rapidsai/raft/issues/1627 if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.0.0) - set(RAFT_ANN_BENCH_USE_FAISS_BFKNN OFF) - set(RAFT_ANN_BENCH_USE_FAISS_IVF_FLAT OFF) - set(RAFT_ANN_BENCH_USE_FAISS_IVF_PQ OFF) + set(RAFT_FAISS_ENABLE_GPU OFF) + set(RAFT_ANN_BENCH_USE_FAISS_GPU_FLAT OFF) + set(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT OFF) + set(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_PQ OFF) + set(RAFT_ANN_BENCH_USE_FAISS_CPU_FLAT OFF) + set(RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_PQ OFF) + set(RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT OFF) + else() + set(RAFT_FAISS_ENABLE_GPU ON) endif() endif() set(RAFT_ANN_BENCH_USE_FAISS OFF) -if(RAFT_ANN_BENCH_USE_FAISS_BFKNN - OR RAFT_ANN_BENCH_USE_FAISS_IVFPQ - OR RAFT_ANN_BENCH_USE_FAISS_IFFLAT +if(RAFT_ANN_BENCH_USE_FAISS_GPU_FLAT + OR RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_PQ + OR RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT + OR RAFT_ANN_BENCH_USE_FAISS_CPU_FLAT + OR RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_PQ + OR RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT ) set(RAFT_ANN_BENCH_USE_FAISS ON) + set(RAFT_USE_FAISS_STATIC ON) endif() set(RAFT_ANN_BENCH_USE_RAFT OFF) if(RAFT_ANN_BENCH_USE_RAFT_IVF_PQ + OR RAFT_ANN_BENCH_USE_RAFT_BRUTE_FORCE OR RAFT_ANN_BENCH_USE_RAFT_IVF_FLAT OR RAFT_ANN_BENCH_USE_RAFT_CAGRA ) @@ -80,6 +106,12 @@ if(RAFT_ANN_BENCH_USE_GGNN) endif() if(RAFT_ANN_BENCH_USE_FAISS) + # We need to ensure that faiss has all the conda + # information. So we currently use the very ugly + # hammer of `link_libraries` to ensure that all + # targets in this directory and the faiss directory + # will have the conda includes/link dirs + link_libraries($) include(cmake/thirdparty/get_faiss.cmake) endif() @@ -116,7 +148,6 @@ function(ConfigureAnnBench) ${BENCH_NAME} PRIVATE raft::raft nlohmann_json::nlohmann_json - $<$:$<$:NCCL::NCCL>> ${ConfigureAnnBench_LINKS} Threads::Threads $<$:${RAFT_CTK_MATH_DEPENDENCIES}> @@ -124,6 +155,8 @@ function(ConfigureAnnBench) $ -static-libgcc -static-libstdc++ + $<$:fmt::fmt-header-only> + $<$:spdlog::spdlog_header_only> ) set_target_properties( @@ -201,6 +234,12 @@ if(RAFT_ANN_BENCH_USE_RAFT_IVF_FLAT) ) endif() +if(RAFT_ANN_BENCH_USE_RAFT_BRUTE_FORCE) + ConfigureAnnBench( + NAME RAFT_BRUTE_FORCE PATH bench/ann/src/raft/raft_benchmark.cu LINKS raft::compiled + ) +endif() + if(RAFT_ANN_BENCH_USE_RAFT_CAGRA) ConfigureAnnBench( NAME @@ -213,20 +252,52 @@ if(RAFT_ANN_BENCH_USE_RAFT_CAGRA) ) endif() -if(RAFT_ANN_BENCH_USE_FAISS_IVF_FLAT) +set(RAFT_FAISS_TARGETS faiss::faiss) +if(TARGET faiss::faiss_avx2) + set(RAFT_FAISS_TARGETS faiss::faiss_avx2) +endif() + +message("RAFT_FAISS_TARGETS: ${RAFT_FAISS_TARGETS}") +message("CUDAToolkit_LIBRARY_DIR: ${CUDAToolkit_LIBRARY_DIR}") +if(RAFT_ANN_BENCH_USE_FAISS_CPU_FLAT) + ConfigureAnnBench( + NAME FAISS_CPU_FLAT PATH bench/ann/src/faiss/faiss_cpu_benchmark.cpp LINKS + ${RAFT_FAISS_TARGETS} + ) +endif() + +if(RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT) + ConfigureAnnBench( + NAME FAISS_CPU_IVF_FLAT PATH bench/ann/src/faiss/faiss_cpu_benchmark.cpp LINKS + ${RAFT_FAISS_TARGETS} + ) +endif() + +if(RAFT_ANN_BENCH_USE_FAISS_CPU_IVF_PQ) ConfigureAnnBench( - NAME FAISS_IVF_FLAT PATH bench/ann/src/faiss/faiss_benchmark.cu LINKS faiss::faiss + NAME FAISS_CPU_IVF_PQ PATH bench/ann/src/faiss/faiss_cpu_benchmark.cpp LINKS + ${RAFT_FAISS_TARGETS} ) endif() -if(RAFT_ANN_BENCH_USE_FAISS_IVF_PQ) +if(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT) ConfigureAnnBench( - NAME FAISS_IVF_PQ PATH bench/ann/src/faiss/faiss_benchmark.cu LINKS faiss::faiss + NAME FAISS_GPU_IVF_FLAT PATH bench/ann/src/faiss/faiss_gpu_benchmark.cu LINKS + ${RAFT_FAISS_TARGETS} ) endif() -if(RAFT_ANN_BENCH_USE_FAISS_BFKNN) - ConfigureAnnBench(NAME FAISS_BFKNN PATH bench/ann/src/faiss/faiss_benchmark.cu LINKS faiss::faiss) +if(RAFT_ANN_BENCH_USE_FAISS_GPU_IVF_PQ) + ConfigureAnnBench( + NAME FAISS_GPU_IVF_PQ PATH bench/ann/src/faiss/faiss_gpu_benchmark.cu LINKS + ${RAFT_FAISS_TARGETS} + ) +endif() + +if(RAFT_ANN_BENCH_USE_FAISS_GPU_FLAT) + ConfigureAnnBench( + NAME FAISS_GPU_FLAT PATH bench/ann/src/faiss/faiss_gpu_benchmark.cu LINKS ${RAFT_FAISS_TARGETS} + ) endif() if(RAFT_ANN_BENCH_USE_GGNN) @@ -277,7 +348,8 @@ if(RAFT_ANN_BENCH_SINGLE_EXE) target_compile_definitions( ANN_BENCH PRIVATE - $<$:ANN_BENCH_LINK_CUDART="libcudart.so.${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}.${CUDAToolkit_VERSION_PATCH}"> + $<$:ANN_BENCH_LINK_CUDART="libcudart.so.${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}.${CUDAToolkit_VERSION_PATCH} + "> $<$:ANN_BENCH_NVTX3_HEADERS_FOUND> ) diff --git a/cpp/bench/ann/src/common/thread_pool.hpp b/cpp/bench/ann/src/common/thread_pool.hpp new file mode 100644 index 0000000000..efea938d5b --- /dev/null +++ b/cpp/bench/ann/src/common/thread_pool.hpp @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2023, 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. + */ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +class FixedThreadPool { + public: + FixedThreadPool(int num_threads) + { + if (num_threads < 1) { + throw std::runtime_error("num_threads must >= 1"); + } else if (num_threads == 1) { + return; + } + + tasks_ = new Task_[num_threads]; + + threads_.reserve(num_threads); + for (int i = 0; i < num_threads; ++i) { + threads_.emplace_back([&, i] { + auto& task = tasks_[i]; + while (true) { + std::unique_lock lock(task.mtx); + task.cv.wait(lock, + [&] { return task.has_task || finished_.load(std::memory_order_relaxed); }); + if (finished_.load(std::memory_order_relaxed)) { break; } + + task.task(); + task.has_task = false; + } + }); + } + } + + ~FixedThreadPool() + { + if (threads_.empty()) { return; } + + finished_.store(true, std::memory_order_relaxed); + for (unsigned i = 0; i < threads_.size(); ++i) { + auto& task = tasks_[i]; + std::lock_guard(task.mtx); + + task.cv.notify_one(); + threads_[i].join(); + } + + delete[] tasks_; + } + + template + void submit(Func f, IdxT len) + { + if (threads_.empty()) { + for (IdxT i = 0; i < len; ++i) { + f(i); + } + return; + } + + const int num_threads = threads_.size(); + // one extra part for competition among threads + const IdxT items_per_thread = len / (num_threads + 1); + std::atomic cnt(items_per_thread * num_threads); + + auto wrapped_f = [&](IdxT start, IdxT end) { + for (IdxT i = start; i < end; ++i) { + f(i); + } + + while (true) { + IdxT i = cnt.fetch_add(1, std::memory_order_relaxed); + if (i >= len) { break; } + f(i); + } + }; + + std::vector> futures; + futures.reserve(num_threads); + for (int i = 0; i < num_threads; ++i) { + IdxT start = i * items_per_thread; + auto& task = tasks_[i]; + { + std::lock_guard lock(task.mtx); + (void)lock; // stop nvcc warning + task.task = std::packaged_task([=] { wrapped_f(start, start + items_per_thread); }); + futures.push_back(task.task.get_future()); + task.has_task = true; + } + task.cv.notify_one(); + } + + for (auto& fut : futures) { + fut.wait(); + } + return; + } + + private: + struct alignas(64) Task_ { + std::mutex mtx; + std::condition_variable cv; + bool has_task = false; + std::packaged_task task; + }; + + Task_* tasks_; + std::vector threads_; + std::atomic finished_{false}; +}; diff --git a/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp b/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp new file mode 100644 index 0000000000..97d1bbf307 --- /dev/null +++ b/cpp/bench/ann/src/faiss/faiss_cpu_benchmark.cpp @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2023, 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "../common/ann_types.hpp" +#include "faiss_cpu_wrapper.h" +#define JSON_DIAGNOSTICS 1 +#include + +namespace raft::bench::ann { + +template +void parse_base_build_param(const nlohmann::json& conf, + typename raft::bench::ann::FaissCpu::BuildParam& param) +{ + param.nlist = conf.at("nlist"); + if (conf.contains("ratio")) { param.ratio = conf.at("ratio"); } +} + +template +void parse_build_param(const nlohmann::json& conf, + typename raft::bench::ann::FaissCpuIVFFlat::BuildParam& param) +{ + parse_base_build_param(conf, param); +} + +template +void parse_build_param(const nlohmann::json& conf, + typename raft::bench::ann::FaissCpuIVFPQ::BuildParam& param) +{ + parse_base_build_param(conf, param); + param.M = conf.at("M"); + if (conf.contains("usePrecomputed")) { + param.usePrecomputed = conf.at("usePrecomputed"); + } else { + param.usePrecomputed = false; + } + if (conf.contains("bitsPerCode")) { + param.bitsPerCode = conf.at("bitsPerCode"); + } else { + param.bitsPerCode = 8; + } +} + +template +void parse_build_param(const nlohmann::json& conf, + typename raft::bench::ann::FaissCpuIVFSQ::BuildParam& param) +{ + parse_base_build_param(conf, param); + param.quantizer_type = conf.at("quantizer_type"); +} + +template +void parse_search_param(const nlohmann::json& conf, + typename raft::bench::ann::FaissCpu::SearchParam& param) +{ + param.nprobe = conf.at("nprobe"); + if (conf.contains("refine_ratio")) { param.refine_ratio = conf.at("refine_ratio"); } + if (conf.contains("numThreads")) { param.num_threads = conf.at("numThreads"); } +} + +template class Algo> +std::unique_ptr> make_algo(raft::bench::ann::Metric metric, + int dim, + const nlohmann::json& conf) +{ + typename Algo::BuildParam param; + parse_build_param(conf, param); + return std::make_unique>(metric, dim, param); +} + +template class Algo> +std::unique_ptr> make_algo(raft::bench::ann::Metric metric, + int dim, + const nlohmann::json& conf, + const std::vector& dev_list) +{ + typename Algo::BuildParam param; + parse_build_param(conf, param); + + (void)dev_list; + return std::make_unique>(metric, dim, param); +} + +template +std::unique_ptr> create_algo(const std::string& algo, + const std::string& distance, + int dim, + const nlohmann::json& conf, + const std::vector& dev_list) +{ + // stop compiler warning; not all algorithms support multi-GPU so it may not be used + (void)dev_list; + + std::unique_ptr> ann; + + if constexpr (std::is_same_v) { + raft::bench::ann::Metric metric = parse_metric(distance); + if (algo == "faiss_cpu_ivf_flat") { + ann = make_algo(metric, dim, conf, dev_list); + } else if (algo == "faiss_cpu_ivf_pq") { + ann = make_algo(metric, dim, conf); + } else if (algo == "faiss_cpu_ivf_sq") { + ann = make_algo(metric, dim, conf); + } else if (algo == "faiss_cpu_flat") { + ann = std::make_unique>(metric, dim); + } + } + + if constexpr (std::is_same_v) {} + + if (!ann) { throw std::runtime_error("invalid algo: '" + algo + "'"); } + + return ann; +} + +template +std::unique_ptr::AnnSearchParam> create_search_param( + const std::string& algo, const nlohmann::json& conf) +{ + 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_cpu_flat") { + auto param = std::make_unique::AnnSearchParam>(); + return param; + } + // else + throw std::runtime_error("invalid algo: '" + algo + "'"); +} + +} // namespace raft::bench::ann + +REGISTER_ALGO_INSTANCE(float); +REGISTER_ALGO_INSTANCE(std::int8_t); +REGISTER_ALGO_INSTANCE(std::uint8_t); + +#ifdef ANN_BENCH_BUILD_MAIN +#include "../common/benchmark.hpp" +int main(int argc, char** argv) { return raft::bench::ann::run_main(argc, argv); } +#endif diff --git a/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h b/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h new file mode 100644 index 0000000000..028a444530 --- /dev/null +++ b/cpp/bench/ann/src/faiss/faiss_cpu_wrapper.h @@ -0,0 +1,313 @@ +/* + * Copyright (c) 2023, 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. + */ +#pragma once + +#include "../common/ann_types.hpp" +#include "../common/thread_pool.hpp" + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace { + +faiss::MetricType parse_metric_type(raft::bench::ann::Metric metric) +{ + if (metric == raft::bench::ann::Metric::kInnerProduct) { + return faiss::METRIC_INNER_PRODUCT; + } else if (metric == raft::bench::ann::Metric::kEuclidean) { + return faiss::METRIC_L2; + } else { + throw std::runtime_error("faiss supports only metric type of inner product and L2"); + } +} +} // namespace + +namespace raft::bench::ann { + +template +class FaissCpu : public ANN { + public: + using typename ANN::AnnSearchParam; + struct SearchParam : public AnnSearchParam { + int nprobe; + float refine_ratio = 1.0; + int num_threads = omp_get_num_procs(); + }; + + struct BuildParam { + int nlist = 1; + int ratio = 2; + }; + + FaissCpu(Metric metric, int dim, const BuildParam& param) + : ANN(metric, dim), + metric_type_(parse_metric_type(metric)), + nlist_{param.nlist}, + training_sample_fraction_{1.0 / double(param.ratio)} + { + static_assert(std::is_same_v, "faiss support only float type"); + } + + virtual ~FaissCpu() noexcept {} + + void build(const T* dataset, size_t nrow, cudaStream_t stream = 0) final; + + void set_search_param(const AnnSearchParam& param) override; + + void init_quantizer(int dim) + { + if (this->metric_type_ == faiss::MetricType::METRIC_L2) { + this->quantizer_ = std::make_unique(dim); + } else if (this->metric_type_ == faiss::MetricType::METRIC_INNER_PRODUCT) { + this->quantizer_ = std::make_unique(dim); + } + } + + // TODO: if the number of results is less than k, the remaining elements of 'neighbors' + // will be filled with (size_t)-1 + void search(const T* queries, + int batch_size, + int k, + size_t* neighbors, + float* distances, + cudaStream_t stream = 0) const final; + + AlgoProperty get_preference() const override + { + AlgoProperty property; + // to enable building big dataset which is larger than memory + property.dataset_memory_type = MemoryType::Host; + property.query_memory_type = MemoryType::Host; + return property; + } + + protected: + template + void save_(const std::string& file) const; + + template + void load_(const std::string& file); + + std::unique_ptr index_; + std::unique_ptr quantizer_; + std::unique_ptr index_refine_; + faiss::MetricType metric_type_; + int nlist_; + double training_sample_fraction_; + + int num_threads_; + std::unique_ptr thread_pool_; +}; + +template +void FaissCpu::build(const T* dataset, size_t nrow, cudaStream_t stream) +{ + auto index_ivf = dynamic_cast(index_.get()); + if (index_ivf != nullptr) { + // set the min/max training size for clustering to use the whole provided training set. + double trainset_size = training_sample_fraction_ * static_cast(nrow); + double points_per_centroid = trainset_size / static_cast(nlist_); + int max_ppc = std::ceil(points_per_centroid); + int min_ppc = std::floor(points_per_centroid); + if (min_ppc < index_ivf->cp.min_points_per_centroid) { + RAFT_LOG_WARN( + "The suggested training set size %zu (data size %zu, training sample ratio %f) yields %d " + "points per cluster (n_lists = %d). This is smaller than the FAISS default " + "min_points_per_centroid = %d.", + static_cast(trainset_size), + nrow, + training_sample_fraction_, + min_ppc, + nlist_, + index_ivf->cp.min_points_per_centroid); + } + index_ivf->cp.max_points_per_centroid = max_ppc; + index_ivf->cp.min_points_per_centroid = min_ppc; + } + index_->train(nrow, dataset); // faiss::IndexFlat::train() will do nothing + assert(index_->is_trained); + index_->add(nrow, dataset); +} + +template +void FaissCpu::set_search_param(const AnnSearchParam& param) +{ + auto search_param = dynamic_cast(param); + int nprobe = search_param.nprobe; + assert(nprobe <= nlist_); + dynamic_cast(index_.get())->nprobe = nprobe; + + if (search_param.refine_ratio > 1.0) { + this->index_refine_ = std::make_unique(this->index_.get()); + this->index_refine_.get()->k_factor = search_param.refine_ratio; + } + + if (!thread_pool_ || num_threads_ != search_param.num_threads) { + num_threads_ = search_param.num_threads; + thread_pool_ = std::make_unique(num_threads_); + } +} + +template +void FaissCpu::search(const T* queries, + int batch_size, + int k, + size_t* neighbors, + float* distances, + cudaStream_t stream) const +{ + static_assert(sizeof(size_t) == sizeof(faiss::idx_t), + "sizes of size_t and faiss::idx_t are different"); + + thread_pool_->submit( + [&](int i) { + // Use thread pool for batch size = 1. FAISS multi-threads internally for batch size > 1. + index_->search(batch_size, queries, k, distances, reinterpret_cast(neighbors)); + }, + 1); +} + +template +template +void FaissCpu::save_(const std::string& file) const +{ + faiss::write_index(index_.get(), file.c_str()); +} + +template +template +void FaissCpu::load_(const std::string& file) +{ + index_ = std::unique_ptr(dynamic_cast(faiss::read_index(file.c_str()))); +} + +template +class FaissCpuIVFFlat : public FaissCpu { + public: + using typename FaissCpu::BuildParam; + + FaissCpuIVFFlat(Metric metric, int dim, const BuildParam& param) : FaissCpu(metric, dim, param) + { + this->init_quantizer(dim); + this->index_ = std::make_unique( + this->quantizer_.get(), dim, param.nlist, this->metric_type_); + } + + void save(const std::string& file) const override + { + this->template save_(file); + } + void load(const std::string& file) override { this->template load_(file); } +}; + +template +class FaissCpuIVFPQ : public FaissCpu { + public: + struct BuildParam : public FaissCpu::BuildParam { + int M; + int bitsPerCode; + bool usePrecomputed; + }; + + FaissCpuIVFPQ(Metric metric, int dim, const BuildParam& param) : FaissCpu(metric, dim, param) + { + this->init_quantizer(dim); + this->index_ = std::make_unique( + this->quantizer_.get(), dim, param.nlist, param.M, param.bitsPerCode, this->metric_type_); + } + + void save(const std::string& file) const override + { + this->template save_(file); + } + 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: + struct BuildParam : public FaissCpu::BuildParam { + std::string quantizer_type; + }; + + FaissCpuIVFSQ(Metric metric, int dim, const BuildParam& param) : FaissCpu(metric, dim, param) + { + faiss::ScalarQuantizer::QuantizerType qtype; + if (param.quantizer_type == "fp16") { + qtype = faiss::ScalarQuantizer::QT_fp16; + } else if (param.quantizer_type == "int8") { + qtype = faiss::ScalarQuantizer::QT_8bit; + } else { + throw std::runtime_error("FaissCpuIVFSQ supports only fp16 and int8 but got " + + param.quantizer_type); + } + + this->init_quantizer(dim); + this->index_ = std::make_unique( + this->quantizer_.get(), dim, param.nlist, qtype, this->metric_type_, true); + } + + void save(const std::string& file) const override + { + this->template save_(file); + } + void load(const std::string& file) override + { + this->template load_(file); + } +}; + +template +class FaissCpuFlat : public FaissCpu { + public: + FaissCpuFlat(Metric metric, int dim) + : FaissCpu(metric, dim, typename FaissCpu::BuildParam{}) + { + this->index_ = std::make_unique(dim, this->metric_type_); + } + + // class FaissCpu is more like a IVF class, so need special treating here + void set_search_param(const typename ANN::AnnSearchParam& param) override + { + auto search_param = dynamic_cast::SearchParam&>(param); + if (!this->thread_pool_ || this->num_threads_ != search_param.num_threads) { + this->num_threads_ = search_param.num_threads; + this->thread_pool_ = std::make_unique(this->num_threads_); + } + }; + + void save(const std::string& file) const override + { + this->template save_(file); + } + void load(const std::string& file) override { this->template load_(file); } +}; + +} // namespace raft::bench::ann diff --git a/cpp/bench/ann/src/faiss/faiss_benchmark.cu b/cpp/bench/ann/src/faiss/faiss_gpu_benchmark.cu similarity index 99% rename from cpp/bench/ann/src/faiss/faiss_benchmark.cu rename to cpp/bench/ann/src/faiss/faiss_gpu_benchmark.cu index 56885cce5c..8b04ba1980 100644 --- a/cpp/bench/ann/src/faiss/faiss_benchmark.cu +++ b/cpp/bench/ann/src/faiss/faiss_gpu_benchmark.cu @@ -24,7 +24,7 @@ #include "../common/ann_types.hpp" #undef WARP_SIZE -#include "faiss_wrapper.h" +#include "faiss_gpu_wrapper.h" #define JSON_DIAGNOSTICS 1 #include diff --git a/cpp/bench/ann/src/faiss/faiss_wrapper.h b/cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h similarity index 79% rename from cpp/bench/ann/src/faiss/faiss_wrapper.h rename to cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h index 672c685b1f..38eeddf813 100644 --- a/cpp/bench/ann/src/faiss/faiss_wrapper.h +++ b/cpp/bench/ann/src/faiss/faiss_gpu_wrapper.h @@ -107,7 +107,7 @@ class FaissGpu : public ANN { void build(const T* dataset, size_t nrow, cudaStream_t stream = 0) final; - void set_search_param(const AnnSearchParam& param) override; + virtual void set_search_param(const FaissGpu::AnnSearchParam& param) {} // TODO: if the number of results is less than k, the remaining elements of 'neighbors' // will be filled with (size_t)-1 @@ -149,6 +149,7 @@ class FaissGpu : public ANN { cudaEvent_t sync_{nullptr}; cudaStream_t faiss_default_stream_{nullptr}; double training_sample_fraction_; + std::unique_ptr search_params_; }; template @@ -183,20 +184,6 @@ void FaissGpu::build(const T* dataset, size_t nrow, cudaStream_t stream) stream_wait(stream); } -template -void FaissGpu::set_search_param(const AnnSearchParam& param) -{ - auto search_param = dynamic_cast(param); - int nprobe = search_param.nprobe; - assert(nprobe <= nlist_); - dynamic_cast(index_.get())->setNumProbes(nprobe); - - if (search_param.refine_ratio > 1.0) { - this->index_refine_ = std::make_unique(this->index_.get()); - this->index_refine_.get()->k_factor = search_param.refine_ratio; - } -} - template void FaissGpu::search(const T* queries, int batch_size, @@ -205,10 +192,9 @@ void FaissGpu::search(const T* queries, float* distances, cudaStream_t stream) const { - static_assert(sizeof(size_t) == sizeof(faiss::Index::idx_t), - "sizes of size_t and faiss::Index::idx_t are different"); - index_->search( - batch_size, queries, k, distances, reinterpret_cast(neighbors)); + static_assert(sizeof(size_t) == sizeof(faiss::idx_t), + "sizes of size_t and faiss::idx_t are different"); + index_->search(batch_size, queries, k, distances, reinterpret_cast(neighbors)); stream_wait(stream); } @@ -247,6 +233,22 @@ class FaissGpuIVFFlat : public FaissGpu { &(this->gpu_resource_), dim, param.nlist, this->metric_type_, config); } + void set_search_param(const typename FaissGpu::AnnSearchParam& param) override + { + auto search_param = dynamic_cast::SearchParam&>(param); + int nprobe = search_param.nprobe; + assert(nprobe <= nlist_); + + faiss::IVFSearchParameters faiss_search_params; + faiss_search_params.nprobe = nprobe; + this->search_params_ = std::make_unique(faiss_search_params); + + if (search_param.refine_ratio > 1.0) { + this->index_refine_ = std::make_unique(this->index_.get()); + this->index_refine_.get()->k_factor = search_param.refine_ratio; + } + } + void save(const std::string& file) const override { this->template save_(file); @@ -282,6 +284,23 @@ class FaissGpuIVFPQ : public FaissGpu { config); } + void set_search_param(const typename FaissGpu::AnnSearchParam& param) override + { + auto search_param = dynamic_cast::SearchParam&>(param); + int nprobe = search_param.nprobe; + assert(nprobe <= nlist_); + + faiss::IVFPQSearchParameters faiss_search_params; + faiss_search_params.nprobe = nprobe; + + this->search_params_ = std::make_unique(faiss_search_params); + + if (search_param.refine_ratio > 1.0) { + this->index_refine_ = std::make_unique(this->index_.get()); + this->index_refine_.get()->k_factor = search_param.refine_ratio; + } + } + void save(const std::string& file) const override { this->template save_(file); @@ -292,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: @@ -317,6 +338,23 @@ class FaissGpuIVFSQ : public FaissGpu { &(this->gpu_resource_), dim, param.nlist, qtype, this->metric_type_, true, config); } + void set_search_param(const typename FaissGpu::AnnSearchParam& param) override + { + auto search_param = dynamic_cast::SearchParam&>(param); + int nprobe = search_param.nprobe; + assert(nprobe <= nlist_); + + faiss::IVFSearchParameters faiss_search_params; + faiss_search_params.nprobe = nprobe; + + this->search_params_ = std::make_unique(faiss_search_params); + + if (search_param.refine_ratio > 1.0) { + this->index_refine_ = std::make_unique(this->index_.get()); + this->index_refine_.get()->k_factor = search_param.refine_ratio; + } + } + void save(const std::string& file) const override { this->template save_( @@ -340,9 +378,14 @@ class FaissGpuFlat : public FaissGpu { this->index_ = std::make_unique( &(this->gpu_resource_), dim, this->metric_type_, config); } + void set_search_param(const typename FaissGpu::AnnSearchParam& param) override + { + auto search_param = dynamic_cast::SearchParam&>(param); + int nprobe = search_param.nprobe; + assert(nprobe <= nlist_); - // class FaissGpu is more like a IVF class, so need special treating here - void set_search_param(const typename ANN::AnnSearchParam&) override{}; + this->search_params_ = std::make_unique(); + } void save(const std::string& file) const override { @@ -356,4 +399,4 @@ class FaissGpuFlat : public FaissGpu { } // namespace raft::bench::ann -#endif +#endif \ No newline at end of file diff --git a/cpp/bench/ann/src/hnswlib/hnswlib_benchmark.cpp b/cpp/bench/ann/src/hnswlib/hnswlib_benchmark.cpp index 7d96e54989..1af19a22cb 100644 --- a/cpp/bench/ann/src/hnswlib/hnswlib_benchmark.cpp +++ b/cpp/bench/ann/src/hnswlib/hnswlib_benchmark.cpp @@ -24,7 +24,6 @@ #include #include -#undef WARP_SIZE #include "hnswlib_wrapper.h" #define JSON_DIAGNOSTICS 1 #include diff --git a/cpp/bench/ann/src/hnswlib/hnswlib_wrapper.h b/cpp/bench/ann/src/hnswlib/hnswlib_wrapper.h index 4d7b993aa1..df44605493 100644 --- a/cpp/bench/ann/src/hnswlib/hnswlib_wrapper.h +++ b/cpp/bench/ann/src/hnswlib/hnswlib_wrapper.h @@ -31,9 +31,8 @@ #include #include -#include - #include "../common/ann_types.hpp" +#include "../common/thread_pool.hpp" #include namespace raft::bench::ann { @@ -53,112 +52,6 @@ struct hnsw_dist_t { using type = int; }; -class FixedThreadPool { - public: - FixedThreadPool(int num_threads) - { - if (num_threads < 1) { - throw std::runtime_error("num_threads must >= 1"); - } else if (num_threads == 1) { - return; - } - - tasks_ = new Task_[num_threads]; - - threads_.reserve(num_threads); - for (int i = 0; i < num_threads; ++i) { - threads_.emplace_back([&, i] { - auto& task = tasks_[i]; - while (true) { - std::unique_lock lock(task.mtx); - task.cv.wait(lock, - [&] { return task.has_task || finished_.load(std::memory_order_relaxed); }); - if (finished_.load(std::memory_order_relaxed)) { break; } - - task.task(); - task.has_task = false; - } - }); - } - } - - ~FixedThreadPool() - { - if (threads_.empty()) { return; } - - finished_.store(true, std::memory_order_relaxed); - for (unsigned i = 0; i < threads_.size(); ++i) { - auto& task = tasks_[i]; - std::lock_guard(task.mtx); - - task.cv.notify_one(); - threads_[i].join(); - } - - delete[] tasks_; - } - - template - void submit(Func f, IdxT len) - { - if (threads_.empty()) { - for (IdxT i = 0; i < len; ++i) { - f(i); - } - return; - } - - const int num_threads = threads_.size(); - // one extra part for competition among threads - const IdxT items_per_thread = len / (num_threads + 1); - std::atomic cnt(items_per_thread * num_threads); - - auto wrapped_f = [&](IdxT start, IdxT end) { - for (IdxT i = start; i < end; ++i) { - f(i); - } - - while (true) { - IdxT i = cnt.fetch_add(1, std::memory_order_relaxed); - if (i >= len) { break; } - f(i); - } - }; - - std::vector> futures; - futures.reserve(num_threads); - for (int i = 0; i < num_threads; ++i) { - IdxT start = i * items_per_thread; - auto& task = tasks_[i]; - { - std::lock_guard lock(task.mtx); - (void)lock; // stop nvcc warning - task.task = std::packaged_task([=] { wrapped_f(start, start + items_per_thread); }); - futures.push_back(task.task.get_future()); - task.has_task = true; - } - task.cv.notify_one(); - } - - for (auto& fut : futures) { - fut.wait(); - } - return; - } - - private: - struct alignas(64) Task_ { - std::mutex mtx; - std::condition_variable cv; - bool has_task = false; - std::packaged_task task; - }; - - Task_* tasks_; - std::vector threads_; - std::atomic finished_{false}; -}; - template class HnswLib : public ANN { public: @@ -281,6 +174,7 @@ void HnswLib::search( { thread_pool_->submit( [&](int i) { + // hnsw can only handle a single vector at a time. get_search_knn_results_(query + i * dim_, k, indices + i * k, distances + i * k); }, batch_size); diff --git a/cpp/bench/ann/src/raft/raft_benchmark.cu b/cpp/bench/ann/src/raft/raft_benchmark.cu index 2f005566a9..fa20c5c223 100644 --- a/cpp/bench/ann/src/raft/raft_benchmark.cu +++ b/cpp/bench/ann/src/raft/raft_benchmark.cu @@ -233,7 +233,7 @@ std::unique_ptr::AnnSearchParam> create_search const std::string& algo, const nlohmann::json& conf) { #ifdef RAFT_ANN_BENCH_USE_RAFT_BFKNN - if (algo == "raft_bfknn") { + if (algo == "raft_brute_force") { auto param = std::make_unique::AnnSearchParam>(); return param; } diff --git a/cpp/bench/ann/src/raft/raft_cagra_wrapper.h b/cpp/bench/ann/src/raft/raft_cagra_wrapper.h index 02aa2ea28b..19c5151186 100644 --- a/cpp/bench/ann/src/raft/raft_cagra_wrapper.h +++ b/cpp/bench/ann/src/raft/raft_cagra_wrapper.h @@ -23,13 +23,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -54,7 +52,7 @@ class RaftCagra : public ANN { using BuildParam = raft::neighbors::cagra::index_params; - RaftCagra(Metric metric, int dim, const BuildParam& param) + RaftCagra(Metric metric, int dim, const BuildParam& param, int concurrent_searches = 1) : ANN(metric, dim), index_params_(param), dimension_(dim), @@ -107,19 +105,16 @@ class RaftCagra : public ANN { template void RaftCagra::build(const T* dataset, size_t nrow, cudaStream_t) { - switch (raft::spatial::knn::detail::utils::check_pointer_residency(dataset)) { - case raft::spatial::knn::detail::utils::pointer_residency::host_only: { - auto dataset_view = - raft::make_host_matrix_view(dataset, IdxT(nrow), dimension_); - index_.emplace(raft::neighbors::cagra::build(handle_, index_params_, dataset_view)); - return; - } - default: { - auto dataset_view = - raft::make_device_matrix_view(dataset, IdxT(nrow), dimension_); - index_.emplace(raft::neighbors::cagra::build(handle_, index_params_, dataset_view)); - return; - } + if (raft::get_device_for_address(dataset) == -1) { + auto dataset_view = + raft::make_host_matrix_view(dataset, IdxT(nrow), dimension_); + index_.emplace(raft::neighbors::cagra::build(handle_, index_params_, dataset_view)); + return; + } else { + auto dataset_view = + raft::make_device_matrix_view(dataset, IdxT(nrow), dimension_); + index_.emplace(raft::neighbors::cagra::build(handle_, index_params_, dataset_view)); + return; } } diff --git a/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h b/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h index da457e32f1..b6df7de068 100644 --- a/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h +++ b/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h b/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h index 8f1e43a706..1b74dcf975 100644 --- a/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h +++ b/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -174,8 +173,7 @@ void RaftIvfPQ::search(const T* queries, raft::runtime::neighbors::ivf_pq::search( handle_, search_params_, *index_, queries_v, candidates.view(), distances_tmp.view()); - if (raft::spatial::knn::detail::utils::check_pointer_residency(dataset_.data_handle()) == - raft::spatial::knn::detail::utils::pointer_residency::device_only) { + if (raft::get_device_for_address(dataset_.data_handle()) >= 0) { auto queries_v = raft::make_device_matrix_view(queries, batch_size, index_->dim()); auto neighbors_v = raft::make_device_matrix_view((IdxT*)neighbors, batch_size, k); diff --git a/cpp/bench/ann/src/raft/raft_wrapper.h b/cpp/bench/ann/src/raft/raft_wrapper.h index c8d98460b7..499bdf29a1 100644 --- a/cpp/bench/ann/src/raft/raft_wrapper.h +++ b/cpp/bench/ann/src/raft/raft_wrapper.h @@ -134,6 +134,8 @@ void RaftGpu::search(const T* queries, float* distances, cudaStream_t stream) const { + // TODO: Integrate new `raft::brute_force::index` (from + // https://github.com/rapidsai/raft/pull/1817) raft::spatial::knn::detail::fusedL2Knn(this->dim_, reinterpret_cast(neighbors), distances, diff --git a/cpp/cmake/thirdparty/get_faiss.cmake b/cpp/cmake/thirdparty/get_faiss.cmake index 680199509d..85829554ae 100644 --- a/cpp/cmake/thirdparty/get_faiss.cmake +++ b/cpp/cmake/thirdparty/get_faiss.cmake @@ -15,7 +15,7 @@ #============================================================================= function(find_and_configure_faiss) - set(oneValueArgs VERSION REPOSITORY PINNED_TAG BUILD_STATIC_LIBS EXCLUDE_FROM_ALL) + set(oneValueArgs VERSION REPOSITORY PINNED_TAG BUILD_STATIC_LIBS EXCLUDE_FROM_ALL ENABLE_GPU) cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) @@ -30,36 +30,56 @@ function(find_and_configure_faiss) set(CPM_DOWNLOAD_faiss ON) endif() + include(cmake/modules/FindAVX.cmake) + + # Link against AVX CPU lib if it exists + set(RAFT_FAISS_GLOBAL_TARGETS faiss::faiss) + set(RAFT_FAISS_EXPORT_GLOBAL_TARGETS faiss) + set(RAFT_FAISS_OPT_LEVEL "generic") + if(CXX_AVX_FOUND) + set(RAFT_FAISS_OPT_LEVEL "avx2") + list(APPEND RAFT_FAISS_GLOBAL_TARGETS faiss::faiss_avx2) + list(APPEND RAFT_FAISS_EXPORT_GLOBAL_TARGETS faiss_avx2) + endif() + rapids_cpm_find(faiss ${PKG_VERSION} - GLOBAL_TARGETS faiss::faiss + GLOBAL_TARGETS ${RAFT_FAISS_GLOBAL_TARGETS} CPM_ARGS GIT_REPOSITORY ${PKG_REPOSITORY} GIT_TAG ${PKG_PINNED_TAG} EXCLUDE_FROM_ALL ${PKG_EXCLUDE_FROM_ALL} OPTIONS + "FAISS_ENABLE_GPU ${PKG_ENABLE_GPU}" "FAISS_ENABLE_PYTHON OFF" - "CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_DIR}" - "FAISS_ENABLE_GPU ON" + "FAISS_OPT_LEVEL ${RAFT_FAISS_OPT_LEVEL}" + "FAISS_USE_CUDA_TOOLKIT_STATIC ${CUDA_STATIC_RUNTIME}" "BUILD_TESTING OFF" "CMAKE_MESSAGE_LOG_LEVEL VERBOSE" - "FAISS_USE_CUDA_TOOLKIT_STATIC ${CUDA_STATIC_RUNTIME}" ) if(TARGET faiss AND NOT TARGET faiss::faiss) add_library(faiss::faiss ALIAS faiss) endif() - if(faiss_ADDED) + if(CXX_AVX_FOUND) + + if(TARGET faiss_avx2 AND NOT TARGET faiss::faiss_avx2) + add_library(faiss::faiss_avx2 ALIAS faiss_avx2) + endif() + endif() + + + if(faiss_ADDED) rapids_export(BUILD faiss EXPORT_SET faiss-targets - GLOBAL_TARGETS faiss + GLOBAL_TARGETS ${RAFT_FAISS_EXPORT_GLOBAL_TARGETS} NAMESPACE faiss::) endif() # We generate the faiss-config files when we built faiss locally, so always do `find_dependency` rapids_export_package(BUILD OpenMP raft-ann-bench-exports) # faiss uses openMP but doesn't export a need for it - rapids_export_package(BUILD faiss raft-ann-bench-exports GLOBAL_TARGETS faiss::faiss faiss) - rapids_export_package(INSTALL faiss raft-ann-bench-exports GLOBAL_TARGETS faiss::faiss faiss) + rapids_export_package(BUILD faiss raft-ann-bench-exports GLOBAL_TARGETS ${RAFT_FAISS_GLOBAL_TARGETS} ${RAFT_FAISS_EXPORT_GLOBAL_TARGETS}) + rapids_export_package(INSTALL faiss raft-ann-bench-exports GLOBAL_TARGETS ${RAFT_FAISS_GLOBAL_TARGETS} ${RAFT_FAISS_EXPORT_GLOBAL_TARGETS}) # Tell cmake where it can find the generated faiss-config.cmake we wrote. include("${rapids-cmake-dir}/export/find_package_root.cmake") @@ -70,19 +90,21 @@ endfunction() if(NOT RAFT_FAISS_GIT_TAG) # TODO: Remove this once faiss supports FAISS_USE_CUDA_TOOLKIT_STATIC # (https://github.com/facebookresearch/faiss/pull/2446) - set(RAFT_FAISS_GIT_TAG fea/statically-link-ctk-v1.7.0) + set(RAFT_FAISS_GIT_TAG fea/statically-link-ctk) # set(RAFT_FAISS_GIT_TAG bde7c0027191f29c9dadafe4f6e68ca0ee31fb30) endif() if(NOT RAFT_FAISS_GIT_REPOSITORY) # TODO: Remove this once faiss supports FAISS_USE_CUDA_TOOLKIT_STATIC # (https://github.com/facebookresearch/faiss/pull/2446) - set(RAFT_FAISS_GIT_REPOSITORY https://github.com/trxcllnt/faiss.git) + set(RAFT_FAISS_GIT_REPOSITORY https://github.com/cjnolet/faiss.git) # set(RAFT_FAISS_GIT_REPOSITORY https://github.com/facebookresearch/faiss.git) endif() -find_and_configure_faiss(VERSION 1.7.0 +find_and_configure_faiss(VERSION 1.7.4 REPOSITORY ${RAFT_FAISS_GIT_REPOSITORY} PINNED_TAG ${RAFT_FAISS_GIT_TAG} BUILD_STATIC_LIBS ${RAFT_USE_FAISS_STATIC} - EXCLUDE_FROM_ALL ${RAFT_EXCLUDE_FAISS_FROM_ALL}) \ No newline at end of file + EXCLUDE_FROM_ALL ${RAFT_EXCLUDE_FAISS_FROM_ALL} + ENABLE_GPU ${RAFT_FAISS_ENABLE_GPU}) + diff --git a/cpp/cmake/thirdparty/get_fmt.cmake b/cpp/cmake/thirdparty/get_fmt.cmake new file mode 100644 index 0000000000..c06f8a78bb --- /dev/null +++ b/cpp/cmake/thirdparty/get_fmt.cmake @@ -0,0 +1,22 @@ +# ============================================================================= +# Copyright (c) 2023, 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. +# ============================================================================= + +# Use CPM to find or clone fmt +function(find_and_configure_fmt) + + include(${rapids-cmake-dir}/cpm/fmt.cmake) + rapids_cpm_fmt(INSTALL_EXPORT_SET rmm-exports BUILD_EXPORT_SET rmm-exports) +endfunction() + +find_and_configure_fmt() \ No newline at end of file diff --git a/cpp/cmake/thirdparty/get_spdlog.cmake b/cpp/cmake/thirdparty/get_spdlog.cmake new file mode 100644 index 0000000000..7c8f3a4722 --- /dev/null +++ b/cpp/cmake/thirdparty/get_spdlog.cmake @@ -0,0 +1,33 @@ +# ============================================================================= +# Copyright (c) 2021-2023, 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. +# ============================================================================= + +# Use CPM to find or clone speedlog +function(find_and_configure_spdlog) + + include(${rapids-cmake-dir}/cpm/spdlog.cmake) + rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO" INSTALL_EXPORT_SET rmm-exports) + rapids_export_package(BUILD spdlog rmm-exports) + + if(spdlog_ADDED) + rapids_export( + BUILD spdlog + EXPORT_SET spdlog + GLOBAL_TARGETS spdlog spdlog_header_only + NAMESPACE spdlog::) + include("${rapids-cmake-dir}/export/find_package_root.cmake") + rapids_export_find_package_root(BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] rmm-exports) + endif() +endfunction() + +find_and_configure_spdlog() \ No newline at end of file diff --git a/dependencies.yaml b/dependencies.yaml index e3fd7d0679..9baacdab4f 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -226,9 +226,8 @@ dependencies: - nlohmann_json>=3.11.2 - glog>=0.6.0 - h5py>=3.8.0 - - libfaiss>=1.7.1 - benchmark>=1.8.2 - - faiss-proc=*=cuda + - openblas - *rmm_conda nn_bench_python: common: diff --git a/docs/source/ann_benchmarks_param_tuning.md b/docs/source/ann_benchmarks_param_tuning.md index e79ef36932..075d82a135 100644 --- a/docs/source/ann_benchmarks_param_tuning.md +++ b/docs/source/ann_benchmarks_param_tuning.md @@ -5,6 +5,10 @@ This guide outlines the various parameter settings that can be specified in [RAF ## RAFT Indexes +### `raft_brute_force` + +Use RAFT brute-force index for exact search. Brute-force has no further build or search parameters. + ### `raft_ivf_flat` IVF-flat uses an inverted-file index, which partitions the vectors into a series of clusters, or lists, storing them in an interleaved format which is optimized for fast distance computation. The searching of an IVF-flat index reduces the total vectors in the index to those within some user-specified nearest clusters called probes. @@ -60,6 +64,10 @@ CAGRA uses a graph-based index, which creates an intermediate, approximate kNN g ## FAISS Indexes +### `faiss_gpu_flat` + +Use FAISS flat index on the GPU, which performs an exact search using brute-force and doesn't have any further build or search parameters. + ### `faiss_gpu_ivf_flat` IVF-flat uses an inverted-file index, which partitions the vectors into a series of clusters, or lists, storing them in an interleaved format which is optimized for fast distance computation. The searching of an IVF-flat index reduces the total vectors in the index to those within some user-specified nearest clusters called probes. @@ -86,7 +94,40 @@ IVF-pq is an inverted-file index, which partitions the vectors into a series of | `numProbes` | `search_params` | Y | Positive Integer >0 | | The closest number of clusters to search for each query vector. Larger values will improve recall but will search more points in the index. | | `refine_ratio` | `search_params` | N| Positive Number >=0 | 0 | `refine_ratio * k` nearest neighbors are queried from the index initially and an additional refinement step improves recall by selecting only the best `k` neighbors. | +### `faiss_cpu_flat` + +Use FAISS flat index on the CPU, which performs an exact search using brute-force and doesn't have any further build or search parameters. + + +| Parameter | Type | Required | Data Type | Default | Description | +|-----------|----------------|----------|---------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `numThreads` | `search_params` | N | Positive Integer >0 | 1 | Number of threads to use for queries. | + +### `faiss_cpu_ivf_flat` +Use FAISS IVF-Flat index on CPU + +| Parameter | Type | Required | Data Type | Default | Description | +|-----------|----------------|----------|---------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `nlists` | `build_param` | Y | Positive Integer >0 | | Number of clusters to partition the vectors into. Larger values will put less points into each cluster but this will impact index build time as more clusters need to be trained. | +| `ratio` | `build_param` | N | Positive Integer >0 | 2 | `1/ratio` is the number of training points which should be used to train the clusters. | +| `nprobe` | `search_params` | Y | Positive Integer >0 | | The closest number of clusters to search for each query vector. Larger values will improve recall but will search more points in the index. | +| `numThreads` | `search_params` | N | Positive Integer >0 | 1 | Number of threads to use for queries. | + +### `faiss_cpu_ivf_pq` + +Use FAISS IVF-PQ index on CPU + +| Parameter | Type | Required | Data Type | Default | Description | +|------------------|----------------|----------|------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `nlists` | `build_param` | Y | Positive Integer >0 | | Number of clusters to partition the vectors into. Larger values will put less points into each cluster but this will impact index build time as more clusters need to be trained. | +| `ratio` | `build_param` | N | Positive Integer >0 | 2 | `1/ratio` is the number of training points which should be used to train the clusters. | +| `M` | `build_param` | Y | Positive Integer Power of 2 [8-64] | | Number of chunks or subquantizers for each vector. | +| `usePrecomputed` | `build_param` | N | Boolean. Default=`false` | `false` | Use pre-computed lookup tables to speed up search at the cost of increased memory usage. | +| `bitsPerCode` | `build_param` | N | Positive Integer [4-8] | 8 | Number of bits to use for each code. | +| `numProbes` | `search_params` | Y | Positive Integer >0 | | The closest number of clusters to search for each query vector. Larger values will improve recall but will search more points in the index. | +| `refine_ratio` | `search_params` | N| Positive Number >=0 | 0 | `refine_ratio * k` nearest neighbors are queried from the index initially and an additional refinement step improves recall by selecting only the best `k` neighbors. | +| `numThreads` | `search_params` | N | Positive Integer >0 | 1 | Number of threads to use for queries. | ## HNSW diff --git a/docs/source/raft_ann_benchmarks.md b/docs/source/raft_ann_benchmarks.md index 8cfac31483..2e8572c299 100644 --- a/docs/source/raft_ann_benchmarks.md +++ b/docs/source/raft_ann_benchmarks.md @@ -384,12 +384,13 @@ The `index` section will contain a list of index objects, each of which will hav The table below contains the possible settings for the `algo` field. Each unique algorithm will have its own set of `build_param` and `search_params` settings. The [ANN Algorithm Parameter Tuning Guide](ann_benchmarks_param_tuning.md) contains detailed instructions on choosing build and search parameters for each supported algorithm. -| Library | Algorithms | -|-----------|----------------------------------------------| -| FAISS | `faiss_gpu_ivf_flat`, `faiss_gpu_ivf_pq` | -| GGNN | `ggnn` | -| HNSWlib | `hnswlib` | -| RAFT | `raft_cagra`, `raft_ivf_flat`, `raft_ivf_pq` | +| Library | Algorithms | +|-----------|-----------------------------------------------------------------| +| FAISS GPU | `faiss_flat`, `faiss_gpu_ivf_flat`, `faiss_gpu_ivf_pq` | +| FAISS CPU | `faiss_flat`, `faiss_ivf_flat`, `faiss_ivf_pq` | +| GGNN | `ggnn` | +| HNSWlib | `hnswlib` | +| RAFT | `raft_brute_force`, `raft_cagra`, `raft_ivf_flat`, `raft_ivf_pq` | diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/algos.yaml b/python/raft-ann-bench/src/raft-ann-bench/run/algos.yaml index 30abe0dda6..f4f928505f 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/algos.yaml +++ b/python/raft-ann-bench/src/raft-ann-bench/run/algos.yaml @@ -1,18 +1,24 @@ -faiss_gpu_ivf_flat: - executable: FAISS_IVF_FLAT_ANN_BENCH - requires_gpu: true faiss_gpu_flat: - executable: FAISS_IVF_FLAT_ANN_BENCH + executable: FAISS_GPU_FLAT_ANN_BENCH + requires_gpu: true +faiss_gpu_ivf_flat: + executable: FAISS_GPU_IVF_FLAT_ANN_BENCH requires_gpu: true faiss_gpu_ivf_pq: - executable: FAISS_IVF_PQ_ANN_BENCH + executable: FAISS_GPU_IVF_PQ_ANN_BENCH requires_gpu: true faiss_gpu_ivf_sq: - executable: FAISS_IVF_PQ_ANN_BENCH - requires_gpu: true -faiss_gpu_bfknn: - executable: FAISS_BFKNN_ANN_BENCH + executable: FAISS_GPU_IVF_PQ_ANN_BENCH requires_gpu: true +faiss_flat: + executable: FAISS_CPU_FLAT_ANN_BENCH + requires_gpu: false +faiss_ivf_flat: + executable: FAISS_CPU_IVF_FLAT_ANN_BENCH + requires_gpu: false +faiss_ivf_pq: + executable: FAISS_CPU_IVF_PQ_ANN_BENCH + requires_gpu: false raft_ivf_flat: executable: RAFT_IVF_FLAT_ANN_BENCH requires_gpu: true @@ -22,6 +28,9 @@ raft_ivf_pq: raft_cagra: executable: RAFT_CAGRA_ANN_BENCH requires_gpu: true +raft_brute_force: + executable: RAFT_BRUTE_FORCE_ANN_BENCH + requires_gpu: true ggnn: executable: GGNN_ANN_BENCH requires_gpu: true diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-100M.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-100M.json index bc77b522a8..3885876022 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-100M.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-100M.json @@ -87,10 +87,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist50K", + "name": "faiss_gpu_ivf_flat.nlist50K", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist":50000}, - "file": "deep-100M/faiss_ivf_flat/nlist50K", + "file": "deep-100M/faiss_gpu_ivf_flat/nlist50K", "search_params": [ {"nprobe":20}, {"nprobe":30}, @@ -103,10 +103,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist100K", + "name": "faiss_gpu_ivf_flat.nlist100K", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist":100000}, - "file": "deep-100M/faiss_ivf_flat/nlist100K", + "file": "deep-100M/faiss_gpu_ivf_flat/nlist100K", "search_params": [ {"nprobe":20}, {"nprobe":30}, @@ -119,10 +119,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist200K", + "name": "faiss_gpu_ivf_flat.nlist200K", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist":200000}, - "file": "deep-100M/faiss_ivf_flat/nlist200K", + "file": "deep-100M/faiss_gpu_ivf_flat/nlist200K", "search_params": [ {"nprobe":20}, {"nprobe":30}, @@ -135,10 +135,10 @@ ] }, { - "name": "faiss_ivf_pq.M48-nlist16K", + "name": "faiss_gpu_ivf_pq.M48-nlist16K", "algo": "faiss_gpu_ivf_pq", "build_param": {"nlist":16384, "M":48}, - "file": "deep-100M/faiss_ivf_pq/M48-nlist16K", + "file": "deep-100M/faiss_gpu_ivf_pq/M48-nlist16K", "search_params": [ {"nprobe":10}, {"nprobe":20}, @@ -151,10 +151,10 @@ ] }, { - "name": "faiss_ivf_pq.M48-nlist50K", + "name": "faiss_gpu_ivf_pq.M48-nlist50K", "algo": "faiss_gpu_ivf_pq", "build_param": {"nlist":50000, "M":48}, - "file": "deep-100M/faiss_ivf_pq/M48-nlist50K", + "file": "deep-100M/faiss_gpu_ivf_pq/M48-nlist50K", "search_params": [ {"nprobe":20}, {"nprobe":30}, @@ -167,10 +167,10 @@ ] }, { - "name": "faiss_ivf_pq.M48-nlist100K", + "name": "faiss_gpu_ivf_pq.M48-nlist100K", "algo": "faiss_gpu_ivf_pq", "build_param": {"nlist":100000, "M":48}, - "file": "deep-100M/faiss_ivf_pq/M48-nlist100K", + "file": "deep-100M/faiss_gpu_ivf_pq/M48-nlist100K", "search_params": [ {"nprobe":20}, {"nprobe":30}, @@ -183,10 +183,10 @@ ] }, { - "name": "faiss_ivf_pq.M48-nlist200K", + "name": "faiss_gpu_ivf_pq.M48-nlist200K", "algo": "faiss_gpu_ivf_pq", "build_param": {"nlist":200000, "M":48}, - "file": "deep-100M/faiss_ivf_pq/M48-nlist200K", + "file": "deep-100M/faiss_gpu_ivf_pq/M48-nlist200K", "search_params": [ {"nprobe":20}, {"nprobe":30}, diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-1B.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-1B.json index 632d2f7308..e5190e073e 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-1B.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-1B.json @@ -14,10 +14,10 @@ "index": [ { - "name": "faiss_ivf_pq.M48-nlist50K", + "name": "faiss_gpu_ivf_pq.M48-nlist50K", "algo": "faiss_gpu_ivf_pq", "build_param": {"nlist":50000, "M":48}, - "file": "deep-1B/faiss_ivf_pq/M48-nlist50K", + "file": "deep-1B/faiss_gpu_ivf_pq/M48-nlist50K", "search_params": [ {"nprobe":1}, {"nprobe":5}, diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-image-96-inner.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-image-96-inner.json index ab82405439..2cdb7235fc 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-image-96-inner.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/deep-image-96-inner.json @@ -106,12 +106,12 @@ "search_result_file": "result/deep-image-96-inner/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/deep-image-96-inner/faiss_ivf_flat/nlist1024", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -138,15 +138,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_flat/nlist1024" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/deep-image-96-inner/faiss_ivf_flat/nlist2048", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -173,15 +173,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_flat/nlist2048" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/deep-image-96-inner/faiss_ivf_flat/nlist4096", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -208,15 +208,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_flat/nlist4096" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/deep-image-96-inner/faiss_ivf_flat/nlist8192", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -243,15 +243,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_flat/nlist8192" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/deep-image-96-inner/faiss_ivf_flat/nlist16384", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -281,10 +281,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_flat/nlist16384" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -292,7 +292,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/deep-image-96-inner/faiss_ivf_pq/M64-nlist1024", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ {"nprobe": 10}, {"nprobe": 50}, @@ -301,10 +301,10 @@ {"nprobe": 500}, {"nprobe": 1000} ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -312,7 +312,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/deep-image-96-inner/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ {"nprobe": 10}, {"nprobe": 50}, @@ -321,16 +321,16 @@ {"nprobe": 500}, {"nprobe": 1000} ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist1024-fp16", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -357,16 +357,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist2048-fp16", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -393,16 +393,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist4096-fp16", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -429,16 +429,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist8192-fp16", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -465,16 +465,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist16384-fp16", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -504,16 +504,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist1024-int8", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -540,16 +540,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist2048-int8", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -576,16 +576,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist4096-int8", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -612,16 +612,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist8192-int8", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -648,16 +648,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/deep-image-96-inner/faiss_ivf_sq/nlist16384-int8", + "file": "index/deep-image-96-inner/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -687,17 +687,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/deep-image-96-inner/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/deep-image-96-inner/faiss_flat/flat", + "file": "index/deep-image-96-inner/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/deep-image-96-inner/faiss_flat/flat" + "search_result_file": "result/deep-image-96-inner/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/fashion-mnist-784-euclidean.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/fashion-mnist-784-euclidean.json index 0efe1fc498..ed45be4e9d 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/fashion-mnist-784-euclidean.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/fashion-mnist-784-euclidean.json @@ -105,12 +105,12 @@ "search_result_file": "result/fashion-mnist-784-euclidean/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist1024", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -137,15 +137,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist1024" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist2048", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -172,15 +172,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist2048" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist4096", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -207,15 +207,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist4096" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist8192", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -242,15 +242,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist8192" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist16384", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -280,10 +280,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_flat/nlist16384" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -291,7 +291,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -312,10 +312,10 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -323,7 +323,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -344,16 +344,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist1024-fp16", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -380,16 +380,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist2048-fp16", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -416,16 +416,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist4096-fp16", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -452,16 +452,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist8192-fp16", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -488,16 +488,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist16384-fp16", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -527,16 +527,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist1024-int8", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -563,16 +563,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist2048-int8", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -599,16 +599,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist4096-int8", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -635,16 +635,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist8192-int8", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -671,16 +671,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist16384-int8", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -710,17 +710,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/fashion-mnist-784-euclidean/faiss_flat/flat", + "file": "index/fashion-mnist-784-euclidean/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/fashion-mnist-784-euclidean/faiss_flat/flat" + "search_result_file": "result/fashion-mnist-784-euclidean/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/gist-960-euclidean.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/gist-960-euclidean.json index b097aa7ca0..3ada85834f 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/gist-960-euclidean.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/gist-960-euclidean.json @@ -104,12 +104,12 @@ "search_result_file": "result/gist-960-euclidean/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/gist-960-euclidean/faiss_ivf_flat/nlist1024", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -136,15 +136,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_flat/nlist1024" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/gist-960-euclidean/faiss_ivf_flat/nlist2048", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -171,15 +171,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_flat/nlist2048" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/gist-960-euclidean/faiss_ivf_flat/nlist4096", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -206,15 +206,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_flat/nlist4096" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/gist-960-euclidean/faiss_ivf_flat/nlist8192", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -241,15 +241,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_flat/nlist8192" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/gist-960-euclidean/faiss_ivf_flat/nlist16384", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -279,10 +279,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_flat/nlist16384" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -290,7 +290,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/gist-960-euclidean/faiss_ivf_pq/M64-nlist1024", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -311,10 +311,10 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -322,7 +322,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/gist-960-euclidean/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -343,16 +343,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist1024-fp16", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -379,16 +379,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist2048-fp16", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -415,16 +415,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist4096-fp16", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -451,16 +451,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist8192-fp16", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -487,16 +487,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist16384-fp16", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -526,16 +526,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist1024-int8", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -562,16 +562,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist2048-int8", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -598,16 +598,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist4096-int8", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -634,16 +634,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist8192-int8", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -670,16 +670,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/gist-960-euclidean/faiss_ivf_sq/nlist16384-int8", + "file": "index/gist-960-euclidean/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -709,17 +709,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/gist-960-euclidean/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/gist-960-euclidean/faiss_flat/flat", + "file": "index/gist-960-euclidean/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/gist-960-euclidean/faiss_flat/flat" + "search_result_file": "result/gist-960-euclidean/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-angular.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-angular.json index 3595084d19..4476da64d4 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-angular.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-angular.json @@ -104,12 +104,12 @@ "search_result_file": "result/glove-100-angular/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/glove-100-angular/faiss_ivf_flat/nlist1024", + "file": "index/glove-100-angular/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -136,15 +136,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_flat/nlist1024" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/glove-100-angular/faiss_ivf_flat/nlist2048", + "file": "index/glove-100-angular/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -171,15 +171,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_flat/nlist2048" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/glove-100-angular/faiss_ivf_flat/nlist4096", + "file": "index/glove-100-angular/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -206,15 +206,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_flat/nlist4096" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/glove-100-angular/faiss_ivf_flat/nlist8192", + "file": "index/glove-100-angular/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -241,15 +241,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_flat/nlist8192" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/glove-100-angular/faiss_ivf_flat/nlist16384", + "file": "index/glove-100-angular/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -279,10 +279,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_flat/nlist16384" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -290,7 +290,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/glove-100-angular/faiss_ivf_pq/M64-nlist1024", + "file": "index/glove-100-angular/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -311,10 +311,10 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -322,7 +322,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/glove-100-angular/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/glove-100-angular/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -343,16 +343,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist1024-fp16", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -379,16 +379,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist2048-fp16", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -415,16 +415,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist4096-fp16", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -451,16 +451,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist8192-fp16", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -487,16 +487,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist16384-fp16", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -526,16 +526,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist1024-int8", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -562,16 +562,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist2048-int8", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -598,16 +598,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist4096-int8", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -634,16 +634,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist8192-int8", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -670,16 +670,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/glove-100-angular/faiss_ivf_sq/nlist16384-int8", + "file": "index/glove-100-angular/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -709,17 +709,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-100-angular/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/glove-100-angular/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/glove-100-angular/faiss_flat/flat", + "file": "index/glove-100-angular/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/glove-100-angular/faiss_flat/flat" + "search_result_file": "result/glove-100-angular/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json index 8b9f1cfb35..ce54ce3f6b 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json @@ -104,12 +104,10 @@ "search_result_file": "result/glove-100-inner/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", - "build_param": { - "nlist": 1024 - }, - "file": "index/glove-100-inner/faiss_ivf_flat/nlist1024", + "build_param": {"nlist":1024}, + "file": "glove-100-inner/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -139,12 +137,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", - "build_param": { - "nlist": 2048 - }, - "file": "index/glove-100-inner/faiss_ivf_flat/nlist2048", + "build_param": {"nlist":2048}, + "file": "glove-100-inner/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -174,12 +170,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", - "build_param": { - "nlist": 4096 - }, - "file": "index/glove-100-inner/faiss_ivf_flat/nlist4096", + "build_param": {"nlist":4096}, + "file": "glove-100-inner/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -209,11 +203,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", - "build_param": { - "nlist": 8192 - }, + "build_param": {"nlist":8192}, + "file": "glove-100-inner/faiss_gpu_ivf_flat/nlist8192", "file": "index/glove-100-inner/faiss_ivf_flat/nlist8192", "search_params": [ { @@ -244,12 +237,12 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/glove-100-inner/faiss_ivf_flat/nlist16384", + "file": "index/glove-100-inner/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -279,10 +272,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-100-inner/faiss_ivf_flat/nlist16384" + "search_result_file": "result/glove-100-inner/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -290,7 +283,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/glove-100-inner/faiss_ivf_pq/M64-nlist1024", + "file": "index/glove-100-inner/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -314,7 +307,7 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -322,7 +315,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/glove-100-inner/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/glove-100-inner/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -343,16 +336,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-inner/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/glove-100-inner/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist1024-fp16", + "file": "index/glove-100-inner/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -379,16 +372,13 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/glove-100-inner/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 2048, - "quantizer_type": "fp16" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist2048-fp16", + "build_param": {"nlist":2048, "quantizer_type":"fp16"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -418,13 +408,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 4096, - "quantizer_type": "fp16" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist4096-fp16", + "build_param": {"nlist":4096, "quantizer_type":"fp16"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -454,13 +441,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 8192, - "quantizer_type": "fp16" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist8192-fp16", + "build_param": {"nlist":8192, "quantizer_type":"fp16"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -490,13 +474,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 16384, - "quantizer_type": "fp16" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist16384-fp16", + "build_param": {"nlist":16384, "quantizer_type":"fp16"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -529,13 +510,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 1024, - "quantizer_type": "int8" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist1024-int8", + "build_param": {"nlist":1024, "quantizer_type":"int8"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -565,13 +543,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 2048, - "quantizer_type": "int8" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist2048-int8", + "build_param": {"nlist":2048, "quantizer_type":"int8"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -601,13 +576,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 4096, - "quantizer_type": "int8" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist4096-int8", + "build_param": {"nlist":4096, "quantizer_type":"int8"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -637,13 +609,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 8192, - "quantizer_type": "int8" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist8192-int8", + "build_param": {"nlist":8192, "quantizer_type":"int8"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -673,13 +642,10 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", - "build_param": { - "nlist": 16384, - "quantizer_type": "int8" - }, - "file": "index/glove-100-inner/faiss_ivf_sq/nlist16384-int8", + "build_param": {"nlist":16384, "quantizer_type":"int8"}, + "file": "glove-100-inner/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -712,14 +678,12 @@ "search_result_file": "result/glove-100-inner/faiss_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/glove-100-inner/faiss_flat/flat", - "search_params": [ - {} - ], - "search_result_file": "result/glove-100-inner/faiss_flat/flat" + "file": "glove-100-inner/faiss_gpu_flat/flat", + "search_params": [{}] + "search_result_file": "result/glove-100-inner/faiss_gpu_flat/flat" }, { @@ -770,7 +734,7 @@ "smemLutDtype": "half" } ], - "search_result_file": "result/glove-100-inner/raft_ivf_pq/dimpq128-cluster1024" + "search_result_file": "result/glove-100-inner/raft_gpu_ivf_pq/dimpq128-cluster1024" }, { "name": "raft_ivf_pq.dimpq128-cluster1024-float-float", diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-50-angular.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-50-angular.json index 0f02620cb2..90a41f46a2 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-50-angular.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-50-angular.json @@ -104,12 +104,12 @@ "search_result_file": "result/glove-50-angular/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/glove-50-angular/faiss_ivf_flat/nlist1024", + "file": "index/glove-50-angular/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -136,15 +136,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_flat/nlist1024" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/glove-50-angular/faiss_ivf_flat/nlist2048", + "file": "index/glove-50-angular/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -171,15 +171,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_flat/nlist2048" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/glove-50-angular/faiss_ivf_flat/nlist4096", + "file": "index/glove-50-angular/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -206,15 +206,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_flat/nlist4096" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/glove-50-angular/faiss_ivf_flat/nlist8192", + "file": "index/glove-50-angular/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -241,15 +241,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_flat/nlist8192" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/glove-50-angular/faiss_ivf_flat/nlist16384", + "file": "index/glove-50-angular/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -279,10 +279,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_flat/nlist16384" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -290,7 +290,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/glove-50-angular/faiss_ivf_pq/M64-nlist1024", + "file": "index/glove-50-angular/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -311,10 +311,10 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -322,7 +322,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/glove-50-angular/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/glove-50-angular/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -343,16 +343,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist1024-fp16", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -379,16 +379,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist2048-fp16", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -415,16 +415,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist4096-fp16", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -451,16 +451,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist8192-fp16", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -487,16 +487,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist16384-fp16", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -526,16 +526,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist1024-int8", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -562,16 +562,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist2048-int8", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -598,16 +598,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist4096-int8", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -634,16 +634,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist8192-int8", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -670,16 +670,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/glove-50-angular/faiss_ivf_sq/nlist16384-int8", + "file": "index/glove-50-angular/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -709,17 +709,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/glove-50-angular/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/glove-50-angular/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/glove-50-angular/faiss_flat/flat", + "file": "index/glove-50-angular/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/glove-50-angular/faiss_flat/flat" + "search_result_file": "result/glove-50-angular/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/lastfm-65-angular.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/lastfm-65-angular.json index e5a4ca6e5f..2d7a2eb7d4 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/lastfm-65-angular.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/lastfm-65-angular.json @@ -104,12 +104,12 @@ "search_result_file": "result/lastfm-65-angular/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/lastfm-65-angular/faiss_ivf_flat/nlist1024", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -136,15 +136,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_flat/nlist1024" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/lastfm-65-angular/faiss_ivf_flat/nlist2048", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -171,15 +171,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_flat/nlist2048" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/lastfm-65-angular/faiss_ivf_flat/nlist4096", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -206,15 +206,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_flat/nlist4096" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/lastfm-65-angular/faiss_ivf_flat/nlist8192", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -241,15 +241,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_flat/nlist8192" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/lastfm-65-angular/faiss_ivf_flat/nlist16384", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -279,10 +279,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_flat/nlist16384" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -290,7 +290,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/lastfm-65-angular/faiss_ivf_pq/M64-nlist1024", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -311,10 +311,10 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -322,7 +322,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/lastfm-65-angular/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -343,16 +343,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist1024-fp16", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -379,16 +379,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist2048-fp16", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -415,16 +415,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist4096-fp16", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -451,16 +451,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist8192-fp16", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -487,16 +487,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist16384-fp16", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -526,16 +526,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist1024-int8", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -562,16 +562,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist2048-int8", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -598,16 +598,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist4096-int8", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -634,16 +634,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist8192-int8", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -670,16 +670,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/lastfm-65-angular/faiss_ivf_sq/nlist16384-int8", + "file": "index/lastfm-65-angular/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -709,17 +709,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/lastfm-65-angular/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/lastfm-65-angular/faiss_flat/flat", + "file": "index/lastfm-65-angular/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/lastfm-65-angular/faiss_flat/flat" + "search_result_file": "result/lastfm-65-angular/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json index 0d488e5096..6e982873bb 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json @@ -105,12 +105,12 @@ c{ "search_result_file": "result/mnist-784-euclidean/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/mnist-784-euclidean/faiss_ivf_flat/nlist1024", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -137,15 +137,15 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_flat/nlist1024" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/mnist-784-euclidean/faiss_ivf_flat/nlist2048", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -172,15 +172,15 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_flat/nlist2048" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/mnist-784-euclidean/faiss_ivf_flat/nlist4096", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -207,15 +207,15 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_flat/nlist4096" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/mnist-784-euclidean/faiss_ivf_flat/nlist8192", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -242,15 +242,15 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_flat/nlist8192" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/mnist-784-euclidean/faiss_ivf_flat/nlist16384", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -280,10 +280,10 @@ c{ "nprobe": 2000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_flat/nlist16384" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -291,7 +291,7 @@ c{ "useFloat16": true, "usePrecomputed": true }, - "file": "index/mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -312,10 +312,10 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -323,7 +323,7 @@ c{ "useFloat16": true, "usePrecomputed": false }, - "file": "index/mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -344,16 +344,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist1024-fp16", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -380,16 +380,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist2048-fp16", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -416,16 +416,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist4096-fp16", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -452,16 +452,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist8192-fp16", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -488,16 +488,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist16384-fp16", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -527,16 +527,16 @@ c{ "nprobe": 2000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist1024-int8", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -563,16 +563,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist2048-int8", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -599,16 +599,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist4096-int8", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -635,16 +635,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist8192-int8", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -671,16 +671,16 @@ c{ "nprobe": 1000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/mnist-784-euclidean/faiss_ivf_sq/nlist16384-int8", + "file": "index/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -710,17 +710,17 @@ c{ "nprobe": 2000 } ], - "search_result_file": "result/mnist-784-euclidean/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/mnist-784-euclidean/faiss_flat/flat", + "file": "index/mnist-784-euclidean/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/mnist-784-euclidean/faiss_flat/flat" + "search_result_file": "result/mnist-784-euclidean/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/nytimes-256-angular.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/nytimes-256-angular.json index e94a9969d9..176c8d281c 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/nytimes-256-angular.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/nytimes-256-angular.json @@ -105,12 +105,12 @@ "search_result_file": "result/nytimes-256-angular/raft_bfknn/bfknn" }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 1024 }, - "file": "index/nytimes-256-angular/faiss_ivf_flat/nlist1024", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_flat/nlist1024", "search_params": [ { "nprobe": 1 @@ -137,15 +137,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_flat/nlist1024" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_flat/nlist1024" }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 2048 }, - "file": "index/nytimes-256-angular/faiss_ivf_flat/nlist2048", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_flat/nlist2048", "search_params": [ { "nprobe": 1 @@ -172,15 +172,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_flat/nlist2048" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_flat/nlist2048" }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 4096 }, - "file": "index/nytimes-256-angular/faiss_ivf_flat/nlist4096", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_flat/nlist4096", "search_params": [ { "nprobe": 1 @@ -207,15 +207,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_flat/nlist4096" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_flat/nlist4096" }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 8192 }, - "file": "index/nytimes-256-angular/faiss_ivf_flat/nlist8192", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_flat/nlist8192", "search_params": [ { "nprobe": 1 @@ -242,15 +242,15 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_flat/nlist8192" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_flat/nlist8192" }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": { "nlist": 16384 }, - "file": "index/nytimes-256-angular/faiss_ivf_flat/nlist16384", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_flat/nlist16384", "search_params": [ { "nprobe": 1 @@ -280,10 +280,10 @@ "nprobe": 2000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_flat/nlist16384" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_flat/nlist16384" }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -291,7 +291,7 @@ "useFloat16": true, "usePrecomputed": true }, - "file": "index/nytimes-256-angular/faiss_ivf_pq/M64-nlist1024", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ { "nprobe": 10 @@ -312,10 +312,10 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -323,7 +323,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "index/nytimes-256-angular/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ { "nprobe": 10 @@ -344,16 +344,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_pq/M64-nlist1024" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_pq/M64-nlist1024" }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "fp16" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist1024-fp16", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ { "nprobe": 1 @@ -380,16 +380,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist1024-fp16" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist1024-fp16" }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "fp16" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist2048-fp16", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ { "nprobe": 1 @@ -416,16 +416,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist2048-fp16" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist2048-fp16" }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "fp16" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist4096-fp16", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ { "nprobe": 1 @@ -452,16 +452,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist4096-fp16" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist4096-fp16" }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "fp16" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist8192-fp16", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ { "nprobe": 1 @@ -488,16 +488,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist8192-fp16" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist8192-fp16" }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "fp16" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist16384-fp16", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ { "nprobe": 1 @@ -527,16 +527,16 @@ "nprobe": 2000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist16384-fp16" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist16384-fp16" }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 1024, "quantizer_type": "int8" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist1024-int8", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ { "nprobe": 1 @@ -563,16 +563,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist1024-int8" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist1024-int8" }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 2048, "quantizer_type": "int8" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist2048-int8", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ { "nprobe": 1 @@ -599,16 +599,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist2048-int8" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist2048-int8" }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 4096, "quantizer_type": "int8" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist4096-int8", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ { "nprobe": 1 @@ -635,16 +635,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist4096-int8" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist4096-int8" }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 8192, "quantizer_type": "int8" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist8192-int8", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ { "nprobe": 1 @@ -671,16 +671,16 @@ "nprobe": 1000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist8192-int8" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist8192-int8" }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": { "nlist": 16384, "quantizer_type": "int8" }, - "file": "index/nytimes-256-angular/faiss_ivf_sq/nlist16384-int8", + "file": "index/nytimes-256-angular/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ { "nprobe": 1 @@ -710,17 +710,17 @@ "nprobe": 2000 } ], - "search_result_file": "result/nytimes-256-angular/faiss_ivf_sq/nlist16384-int8" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_ivf_sq/nlist16384-int8" }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "index/nytimes-256-angular/faiss_flat/flat", + "file": "index/nytimes-256-angular/faiss_gpu_flat/flat", "search_params": [ {} ], - "search_result_file": "result/nytimes-256-angular/faiss_flat/flat" + "search_result_file": "result/nytimes-256-angular/faiss_gpu_flat/flat" }, { diff --git a/python/raft-ann-bench/src/raft-ann-bench/run/conf/sift-128-euclidean.json b/python/raft-ann-bench/src/raft-ann-bench/run/conf/sift-128-euclidean.json index 439c1a10c6..ff639cb90c 100644 --- a/python/raft-ann-bench/src/raft-ann-bench/run/conf/sift-128-euclidean.json +++ b/python/raft-ann-bench/src/raft-ann-bench/run/conf/sift-128-euclidean.json @@ -93,10 +93,10 @@ "search_params": [{"probe": 1}] }, { - "name": "faiss_ivf_flat.nlist1024", + "name": "faiss_gpu_ivf_flat.nlist1024", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist": 1024}, - "file": "sift-128-euclidean/faiss_ivf_flat/nlist1024", + "file": "sift-128-euclidean/faiss_gpu_ivf_flat/nlist1024", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -109,10 +109,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist2048", + "name": "faiss_gpu_ivf_flat.nlist2048", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist": 2048}, - "file": "sift-128-euclidean/faiss_ivf_flat/nlist2048", + "file": "sift-128-euclidean/faiss_gpu_ivf_flat/nlist2048", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -125,10 +125,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist4096", + "name": "faiss_gpu_ivf_flat.nlist4096", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist": 4096}, - "file": "sift-128-euclidean/faiss_ivf_flat/nlist4096", + "file": "sift-128-euclidean/faiss_gpu_ivf_flat/nlist4096", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -141,10 +141,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist8192", + "name": "faiss_gpu_ivf_flat.nlist8192", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist": 8192}, - "file": "sift-128-euclidean/faiss_ivf_flat/nlist8192", + "file": "sift-128-euclidean/faiss_gpu_ivf_flat/nlist8192", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -157,10 +157,10 @@ ] }, { - "name": "faiss_ivf_flat.nlist16384", + "name": "faiss_gpu_ivf_flat.nlist16384", "algo": "faiss_gpu_ivf_flat", "build_param": {"nlist": 16384}, - "file": "sift-128-euclidean/faiss_ivf_flat/nlist16384", + "file": "sift-128-euclidean/faiss_gpu_ivf_flat/nlist16384", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -174,10 +174,10 @@ ] }, { - "name": "faiss_ivf_pq.M64-nlist1024", + "name": "faiss_gpu_ivf_pq.M64-nlist1024", "algo": "faiss_gpu_ivf_pq", "build_param": {"nlist": 1024, "M": 64, "useFloat16": true, "usePrecomputed": true}, - "file": "sift-128-euclidean/faiss_ivf_pq/M64-nlist1024", + "file": "sift-128-euclidean/faiss_gpu_ivf_pq/M64-nlist1024", "search_params": [ {"nprobe": 10}, {"nprobe": 50}, @@ -188,7 +188,7 @@ ] }, { - "name": "faiss_ivf_pq.M64-nlist1024.noprecomp", + "name": "faiss_gpu_ivf_pq.M64-nlist1024.noprecomp", "algo": "faiss_gpu_ivf_pq", "build_param": { "nlist": 1024, @@ -196,7 +196,7 @@ "useFloat16": true, "usePrecomputed": false }, - "file": "sift-128-euclidean/faiss_ivf_pq/M64-nlist1024.noprecomp", + "file": "sift-128-euclidean/faiss_gpu_ivf_pq/M64-nlist1024.noprecomp", "search_params": [ {"nprobe": 10}, {"nprobe": 50}, @@ -207,10 +207,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist1024-fp16", + "name": "faiss_gpu_ivf_sq.nlist1024-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 1024, "quantizer_type": "fp16"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist1024-fp16", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist1024-fp16", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -223,10 +223,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist2048-fp16", + "name": "faiss_gpu_ivf_sq.nlist2048-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 2048, "quantizer_type": "fp16"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist2048-fp16", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist2048-fp16", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -239,10 +239,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist4096-fp16", + "name": "faiss_gpu_ivf_sq.nlist4096-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 4096, "quantizer_type": "fp16"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist4096-fp16", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist4096-fp16", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -255,10 +255,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist8192-fp16", + "name": "faiss_gpu_ivf_sq.nlist8192-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 8192, "quantizer_type": "fp16"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist8192-fp16", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist8192-fp16", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -271,10 +271,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist16384-fp16", + "name": "faiss_gpu_ivf_sq.nlist16384-fp16", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 16384, "quantizer_type": "fp16"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist16384-fp16", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist16384-fp16", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -288,10 +288,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist1024-int8", + "name": "faiss_gpu_ivf_sq.nlist1024-int8", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 1024, "quantizer_type": "int8"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist1024-int8", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist1024-int8", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -304,10 +304,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist2048-int8", + "name": "faiss_gpu_ivf_sq.nlist2048-int8", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 2048,"quantizer_type": "int8"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist2048-int8", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist2048-int8", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -320,10 +320,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist4096-int8", + "name": "faiss_gpu_ivf_sq.nlist4096-int8", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 4096, "quantizer_type": "int8"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist4096-int8", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist4096-int8", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -336,10 +336,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist8192-int8", + "name": "faiss_gpu_ivf_sq.nlist8192-int8", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 8192, "quantizer_type": "int8"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist8192-int8", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist8192-int8", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -352,10 +352,10 @@ ] }, { - "name": "faiss_ivf_sq.nlist16384-int8", + "name": "faiss_gpu_ivf_sq.nlist16384-int8", "algo": "faiss_gpu_ivf_sq", "build_param": {"nlist": 16384, "quantizer_type": "int8"}, - "file": "sift-128-euclidean/faiss_ivf_sq/nlist16384-int8", + "file": "sift-128-euclidean/faiss_gpu_ivf_sq/nlist16384-int8", "search_params": [ {"nprobe": 1}, {"nprobe": 5}, @@ -369,10 +369,10 @@ ] }, { - "name": "faiss_flat", + "name": "faiss_gpu_flat", "algo": "faiss_gpu_flat", "build_param": {}, - "file": "sift-128-euclidean/faiss_flat/flat", + "file": "sift-128-euclidean/faiss_gpu_flat/flat", "search_params": [{}] }, {