Skip to content

Commit

Permalink
Teach faiss about conda [hacky]
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Oct 4, 2023
1 parent f54a757 commit 385b4f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,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($<TARGET_NAME_IF_EXISTS:conda_env>)
include(cmake/thirdparty/get_faiss.cmake)
endif()

Expand Down
1 change: 0 additions & 1 deletion cpp/cmake/thirdparty/get_faiss.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function(find_and_configure_faiss)
"FAISS_USE_CUDA_TOOLKIT_STATIC ${CUDA_STATIC_RUNTIME}"
"BUILD_TESTING OFF"
"CMAKE_MESSAGE_LOG_LEVEL VERBOSE"
"CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_DIR}"
)

if(TARGET faiss AND NOT TARGET faiss::faiss)
Expand Down

0 comments on commit 385b4f4

Please sign in to comment.