Skip to content
Open
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
1 change: 1 addition & 0 deletions cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ function(ConfigureAnnBench)
nlohmann_json::nlohmann_json
sqlite3
Threads::Threads
${CMAKE_DL_LIBS}
$<$<BOOL:${GPU_BUILD}>:CUDA::cudart_static>
$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
$<TARGET_NAME_IF_EXISTS:conda_env>
Expand Down
21 changes: 21 additions & 0 deletions cpp/cmake/thirdparty/get_faiss.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,27 @@ function(find_and_configure_faiss)
set(CPM_DOWNLOAD_faiss ON)
endif()

<<<<<<< sve
include(cmake/modules/FindAVX)
include(cmake/modules/FindSVE)
=======
include(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../modules/FindAVX.cmake)
include(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../modules/FindSVE.cmake)
>>>>>>> main
Comment on lines +36 to +42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

target="cpp/cmake/thirdparty/get_faiss.cmake"

echo "== Conflict markers (must be empty) =="
rg -n '^(<<<<<<<|=======|>>>>>>>)' "$target" || true

echo
echo "== Bare endif tokens (should generally use endif()) =="
rg -n '^\s*endif\s*$' "$target" || true

Repository: rapidsai/cuvs

Length of output: 292


Resolve unresolved merge-conflict markers before merge.

Lines 36–42, 48–69, and 132–136 contain unresolved conflict markers (<<<<<<<, =======, >>>>>>>). This file will fail CMake parsing and block configuration.

Additionally, line 51 uses bare endif instead of endif() — resolve both issues when consolidating the conflicted blocks.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/cmake/thirdparty/get_faiss.cmake` around lines 36 - 42, This file
contains unresolved git conflict markers around the include lines for
FindAVX/FindSVE and elsewhere; remove the conflict markers (<<<<<<<, =======,
>>>>>>>) and consolidate to the intended includes (use the fully-qualified
includes that reference
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../modules/FindAVX.cmake and FindSVE.cmake
rather than the bare names) so CMake can parse the file; also replace the bare
endif with a proper endif() and scan the other flagged ranges (lines ~48–69 and
~132–136) to resolve any remaining duplicate/contradictory blocks, keeping only
a single consistent implementation for the FindAVX/FindSVE logic and proper
CMake block terminators.

# Link against AVX CPU lib if it exists
set(CUVS_FAISS_OPT_LEVEL "generic")
if(CXX_AVX2_FOUND)
set(CUVS_FAISS_OPT_LEVEL "avx2")
endif()
<<<<<<< sve
if(CXX_SVE_FOUND)
set(CUVS_FAISS_OPT_LEVEL "sve")
endif

rapids_cpm_find(faiss ${version} ${find_args}
GLOBAL_TARGETS faiss faiss_avx2 faiss_gpu_objs faiss::faiss faiss::faiss_avx2 faiss::faiss_sve
CPM_ARGS ${cpm_args}
=======
if(CXX_SVE_FOUND AND CUVS_CPU_ONLY_FAISS_ENABLE_SVE)
set(CUVS_FAISS_OPT_LEVEL "sve")
endif()
Expand All @@ -52,6 +66,7 @@ function(find_and_configure_faiss)
GIT_TAG ${tag}
GIT_SHALLOW ${shallow} ${patch_command}
EXCLUDE_FROM_ALL ${exclude}
>>>>>>> main
OPTIONS
"FAISS_ENABLE_GPU ${PKG_ENABLE_GPU}"
"FAISS_ENABLE_CUVS ${PKG_ENABLE_GPU}"
Expand Down Expand Up @@ -108,11 +123,17 @@ function(find_and_configure_faiss)
# and fail due to invalid compiler flags.
if(PKG_ENABLE_GPU AND PKG_BUILD_STATIC_LIBS AND CXX_AVX2_FOUND)
set(CUVS_FAISS_TARGETS "$<LINK_GROUP:RESCAN,$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu_objs>,faiss::faiss_avx2>" PARENT_SCOPE)
elseif(PKG_ENABLE_GPU AND PKG_BUILD_STATIC_LIBS AND CXX_SVE_FOUND)
set(CUVS_FAISS_TARGETS "$<LINK_GROUP:RESCAN,$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu_objs>,faiss::faiss_sve>" PARENT_SCOPE)
elseif(PKG_ENABLE_GPU AND PKG_BUILD_STATIC_LIBS)
set(CUVS_FAISS_TARGETS "$<LINK_GROUP:RESCAN,$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu_objs>,faiss::faiss>" PARENT_SCOPE)
elseif(CXX_AVX2_FOUND)
set(CUVS_FAISS_TARGETS faiss::faiss_avx2 PARENT_SCOPE)
<<<<<<< sve
elseif(CXX_SVE_FOUND)
=======
elseif(CXX_SVE_FOUND AND CUVS_CPU_ONLY_FAISS_ENABLE_SVE)
>>>>>>> main
set(CUVS_FAISS_TARGETS faiss::faiss_sve PARENT_SCOPE)
else()
set(CUVS_FAISS_TARGETS faiss::faiss PARENT_SCOPE)
Expand Down
Loading