Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
additional_dependencies: [toml]
args: ["--config=pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
rev: v20.1.4
hooks:
- id: clang-format
types_or: [c, c++, cuda]
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/all_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- breathe>=4.35.0
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-nvtx=11.8
- cuda-profiler-api=11.8.86
Expand All @@ -26,7 +26,7 @@ dependencies:
- go
- graphviz
- ipython
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev=11.11.3.6
- libcublas=11.11.3.6
- libcurand-dev=10.3.0.86
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- breathe>=4.35.0
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-nvtx=11.8
- cuda-profiler-api=11.8.86
Expand All @@ -26,7 +26,7 @@ dependencies:
- go
- graphviz
- ipython
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev=11.11.3.6
- libcublas=11.11.3.6
- libcurand-dev=10.3.0.86
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/all_cuda-128_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- breathe>=4.35.0
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvcc
Expand All @@ -27,7 +27,7 @@ dependencies:
- go
- graphviz
- ipython
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/all_cuda-128_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- breathe>=4.35.0
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvcc
Expand All @@ -27,7 +27,7 @@ dependencies:
- go
- graphviz
- ipython
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/bench_ann_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- benchmark>=1.8.2
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- click
- cmake>=3.30.4
- cuda-nvtx=11.8
Expand All @@ -26,7 +26,7 @@ dependencies:
- gcc_linux-aarch64=11.*
- glog>=0.6.0
- h5py>=3.8.0
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev=11.11.3.6
- libcublas=11.11.3.6
- libcurand-dev=10.3.0.86
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/bench_ann_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- benchmark>=1.8.2
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- click
- cmake>=3.30.4
- cuda-nvtx=11.8
Expand All @@ -28,7 +28,7 @@ dependencies:
- h5py>=3.8.0
- libaio
- libboost-devel=1.87
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev=11.11.3.6
- libcublas=11.11.3.6
- libcurand-dev=10.3.0.86
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/bench_ann_cuda-128_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- benchmark>=1.8.2
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- click
- cmake>=3.30.4
- cuda-cudart-dev
Expand All @@ -27,7 +27,7 @@ dependencies:
- gcc_linux-aarch64=13.*
- glog>=0.6.0
- h5py>=3.8.0
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/bench_ann_cuda-128_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ channels:
dependencies:
- benchmark>=1.8.2
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- click
- cmake>=3.30.4
- cuda-cudart-dev
Expand All @@ -29,7 +29,7 @@ dependencies:
- h5py>=3.8.0
- libaio
- libboost-devel=1.87
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/go_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ channels:
- nvidia
dependencies:
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-nvtx=11.8
- cuda-profiler-api=11.8.86
Expand All @@ -19,7 +19,7 @@ dependencies:
- dlpack>=0.8,<1.0
- gcc_linux-aarch64=11.*
- go
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev=11.11.3.6
- libcublas=11.11.3.6
- libcurand-dev=10.3.0.86
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/go_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ channels:
- nvidia
dependencies:
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-nvtx=11.8
- cuda-profiler-api=11.8.86
Expand All @@ -19,7 +19,7 @@ dependencies:
- dlpack>=0.8,<1.0
- gcc_linux-64=11.*
- go
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev=11.11.3.6
- libcublas=11.11.3.6
- libcurand-dev=10.3.0.86
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/go_cuda-128_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ channels:
- nvidia
dependencies:
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvcc
Expand All @@ -20,7 +20,7 @@ dependencies:
- dlpack>=0.8,<1.0
- gcc_linux-aarch64=13.*
- go
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/go_cuda-128_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ channels:
- nvidia
dependencies:
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvcc
Expand All @@ -20,7 +20,7 @@ dependencies:
- dlpack>=0.8,<1.0
- gcc_linux-64=13.*
- go
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ channels:
- nvidia
dependencies:
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvcc
- cuda-nvtx-dev
- cuda-profiler-api
- cuda-version=12.8
- cuda-version=12.9
- cxx-compiler
- gcc_linux-aarch64=13.*
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand All @@ -30,4 +30,4 @@ dependencies:
- ninja
- rust
- sysroot_linux-aarch64==2.28
name: rust_cuda-128_arch-aarch64
name: rust_cuda-129_arch-aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ channels:
- nvidia
dependencies:
- c-compiler
- clang-tools==16.0.6
- clang==16.0.6
- clang-tools==20.1.4
- clang==20.1.4
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvcc
- cuda-nvtx-dev
- cuda-profiler-api
- cuda-version=12.8
- cuda-version=12.9
- cxx-compiler
- gcc_linux-64=13.*
- libclang==16.0.6
- libclang==20.1.4
- libcublas-dev
- libcurand-dev
- libcusolver-dev
Expand All @@ -30,4 +30,4 @@ dependencies:
- ninja
- rust
- sysroot_linux-64==2.28
name: rust_cuda-128_arch-x86_64
name: rust_cuda-129_arch-x86_64
17 changes: 17 additions & 0 deletions cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ option(CUVS_ANN_BENCH_USE_FAISS_GPU_FLAT "Include faiss' brute-force knn algorit
option(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT "Include faiss' ivf flat algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_PQ "Include faiss' ivf pq algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA "Include faiss' cagra algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA_HNSW
"Include faiss' cagra algorithm for build and hnsw for search in benchmark" ON
)
option(CUVS_ANN_BENCH_USE_FAISS_CPU_FLAT "Include faiss' cpu brute-force algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT "Include faiss' cpu ivf flat algorithm in benchmark"
ON
)
option(CUVS_ANN_BENCH_USE_FAISS_CPU_IVF_PQ "Include faiss' cpu ivf pq algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_FAISS_CPU_HNSW_FLAT "Include faiss' hnsw algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_CUVS_IVF_FLAT "Include cuVS ivf flat algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_CUVS_IVF_PQ "Include cuVS ivf pq algorithm in benchmark" ON)
option(CUVS_ANN_BENCH_USE_CUVS_CAGRA "Include cuVS CAGRA in benchmark" ON)
Expand Down Expand Up @@ -276,6 +280,12 @@ if(CUVS_ANN_BENCH_USE_FAISS_CPU_IVF_PQ)
)
endif()

if(CUVS_ANN_BENCH_USE_FAISS_CPU_HNSW_FLAT)
ConfigureAnnBench(
NAME FAISS_CPU_HNSW_FLAT PATH src/faiss/faiss_cpu_benchmark.cpp LINKS ${CUVS_FAISS_TARGETS}
)
endif()

if(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT AND CUVS_FAISS_ENABLE_GPU)
ConfigureAnnBench(
NAME FAISS_GPU_IVF_FLAT PATH src/faiss/faiss_gpu_benchmark.cu LINKS ${CUVS_FAISS_TARGETS}
Expand Down Expand Up @@ -304,6 +314,13 @@ if(CUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA AND CUVS_FAISS_ENABLE_GPU)
)
endif()

if(CUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA_HNSW AND CUVS_FAISS_ENABLE_GPU)
ConfigureAnnBench(
NAME FAISS_GPU_CAGRA_HNSW PATH src/faiss/faiss_gpu_benchmark.cu LINKS ${CUVS_FAISS_TARGETS}
raft::raft
)
endif()

if(CUVS_ANN_BENCH_USE_GGNN)
include(cmake/thirdparty/get_glog)
ConfigureAnnBench(
Expand Down
6 changes: 3 additions & 3 deletions cpp/bench/ann/src/common/ann_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class algo : public algo_base {
// and set_search_dataset() should save the passed-in pointer somewhere.
// The client code should call set_search_dataset() before searching,
// and should not release dataset before searching is finished.
virtual void set_search_dataset(const T* /*dataset*/, size_t /*nrow*/){};
virtual void set_search_dataset(const T* /*dataset*/, size_t /*nrow*/) {};

/**
* Make a shallow copy of the algo wrapper that shares the resources and ensures thread-safe
Expand All @@ -181,6 +181,6 @@ class algo : public algo_base {
#define REGISTER_ALGO_INSTANCE(DataT) \
template auto cuvs::bench::create_algo<DataT>( \
const std::string&, const std::string&, int, const nlohmann::json&) \
->std::unique_ptr<cuvs::bench::algo<DataT>>; \
-> std::unique_ptr<cuvs::bench::algo<DataT>>; \
template auto cuvs::bench::create_search_param<DataT>(const std::string&, const nlohmann::json&) \
->std::unique_ptr<typename cuvs::bench::algo<DataT>::search_param>;
-> std::unique_ptr<typename cuvs::bench::algo<DataT>::search_param>;
8 changes: 5 additions & 3 deletions cpp/bench/ann/src/common/util.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -388,20 +388,22 @@ inline auto host_info()
uint64_t cpu_freq_max = 0;
int host_processors_used = 0;
int host_cores_used = 0;
std::set<int> host_cores_selected{};
std::set<std::pair<int, int>> host_cores_selected{}; // pairs of (socket_id, core_id)
for (int cpu_id = 0; cpu_id < host_processors_configured; cpu_id++) {
if (CPU_ISSET_S(cpu_id, affinity_mask_buf.size(), affinity_mask) == 0) { continue; }
host_processors_used++;
std::string cpu_fpath = "/sys/devices/system/cpu/cpu" + std::to_string(cpu_id);
if (!std::filesystem::exists(cpu_fpath)) { continue; }

int this_cpu_core = 0;
int this_cpu_package = 0;
uint64_t this_cpu_freq_min = 0;
uint64_t this_cpu_freq_max = 0;
std::ifstream(cpu_fpath + "/topology/core_id") >> this_cpu_core;
std::ifstream(cpu_fpath + "/topology/physical_package_id") >> this_cpu_package;
std::ifstream(cpu_fpath + "/cpufreq/scaling_min_freq") >> this_cpu_freq_min;
std::ifstream(cpu_fpath + "/cpufreq/scaling_max_freq") >> this_cpu_freq_max;
host_cores_selected.insert(this_cpu_core);
host_cores_selected.insert(std::make_pair(this_cpu_package, this_cpu_core));
cpu_freq_min = cpu_freq_min == 0
? (this_cpu_freq_min * 1000ull)
: std::min<uint64_t>(this_cpu_freq_min * 1000ull, cpu_freq_min);
Expand Down
Loading