Skip to content

Commit 91c51b1

Browse files
CMake check for FAISS use in benchmarks (rapidsai#1591)
CUVS_ANN_BENCH_USE_FAISS is now set to OFF if all relevant flags are set OFF. The status is reported in the cmake log: -- Finding or building hnswlib -- Checking for FAISS use in benchmarks... -- CUVS_ANN_BENCH_USE_FAISS is OFF closes rapidsai#1590. Authors: - https://github.com/irina-resh-nvda Approvers: - Tamas Bela Feher (https://github.com/tfeher) URL: rapidsai#1591
1 parent 94b59e2 commit 91c51b1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

cpp/bench/ann/CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,29 @@ option(CUVS_KNN_BENCH_USE_CUVS_BRUTE_FORCE "Include cuVS brute force knn in benc
5151

5252
find_package(Threads REQUIRED)
5353

54-
set(CUVS_ANN_BENCH_USE_FAISS ON)
54+
# ----- FAISS use in Benchmarks ----
55+
get_cmake_property(_variableNames VARIABLES)
56+
57+
set(CUVS_ANN_BENCH_USE_FAISS OFF)
58+
message(STATUS "Checking for FAISS use in benchmarks...")
59+
foreach(_varName ${_variableNames})
60+
if(_varName MATCHES "CUVS_ANN_BENCH_USE_FAISS.+")
61+
if(${_varName})
62+
set(CUVS_ANN_BENCH_USE_FAISS ON)
63+
message(STATUS "${_varName} is detected as ON.")
64+
break()
65+
endif()
66+
endif()
67+
endforeach()
68+
69+
if(CUVS_ANN_BENCH_USE_FAISS)
70+
message(STATUS "CUVS_ANN_BENCH_USE_FAISS is switched ON")
71+
else()
72+
message(STATUS "CUVS_ANN_BENCH_USE_FAISS is switched OFF")
73+
endif()
74+
75+
# ----------------------------------
76+
5577
set(CUVS_FAISS_ENABLE_GPU ON)
5678
set(CUVS_USE_FAISS_STATIC ON)
5779

0 commit comments

Comments
 (0)