Enable faiss "sve" opt_level#1587
Conversation
The FindSVE.cmake module exists in the repository but was not being included or checked, preventing the use of the SVE-optimized faiss libraries on ARM systems that support SVE instructions. Linking against dynamic linker library for fixing linking error Signed-off-by: Lizhen You <lyou@nvidia.com>
|
/ok to test bd5a9a0 |
|
/ok to test 9eb9b8f |
|
/ok to test 9eb9b8f |
|
/ok to test 271990c |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR updates CMake build configuration in two areas: ANN benchmark targets now link against dynamic-loader libraries, and FAISS discovery is refactored to include local AVX/SVE modules directly with refined target selection for SVE-enabled builds. ChangesBuild Target Configuration and FAISS Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with 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.
Inline comments:
In `@cpp/cmake/thirdparty/get_faiss.cmake`:
- Around line 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.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 50e97768-161b-4721-9de1-99c78d4e5d6e
📒 Files selected for processing (2)
cpp/bench/ann/CMakeLists.txtcpp/cmake/thirdparty/get_faiss.cmake
| <<<<<<< 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 |
There was a problem hiding this comment.
🧩 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" || trueRepository: 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.
The FindSVE.cmake module exists in the repository but was not being included or checked, preventing the use of the SVE-optimized faiss libraries on ARM systems that support SVE instructions.
Linking against dynamic linker library for fixing linking error