This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 6a67606b6e9 branch-4.0: [fix](faiss) fix faiss compile on noavx2
enviroment #57642 (#57651)
6a67606b6e9 is described below
commit 6a67606b6e9ca0752c43a2f086da11a576e4ba81
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 4 21:17:11 2025 +0800
branch-4.0: [fix](faiss) fix faiss compile on noavx2 enviroment #57642
(#57651)
Cherry-picked from #57642
Co-authored-by: Jack <[email protected]>
---
.../rowset/segment_v2/ann_index/cmake-protect/CMakeLists.txt | 9 +++++++++
contrib/faiss | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git
a/be/src/olap/rowset/segment_v2/ann_index/cmake-protect/CMakeLists.txt
b/be/src/olap/rowset/segment_v2/ann_index/cmake-protect/CMakeLists.txt
index 8e5272711b8..e0e4354e178 100644
--- a/be/src/olap/rowset/segment_v2/ann_index/cmake-protect/CMakeLists.txt
+++ b/be/src/olap/rowset/segment_v2/ann_index/cmake-protect/CMakeLists.txt
@@ -41,6 +41,15 @@ set(FAISS_ENABLE_GPU OFF CACHE BOOL "Disable GPU support in
FAISS")
set(FAISS_ENABLE_PYTHON OFF CACHE BOOL "Disable Python support in FAISS")
set(FAISS_ENABLE_EXTRAS OFF CACHE BOOL "Disable FAISS extras")
set(BUILD_TESTING OFF CACHE BOOL "Disable FAISS testing")
+if (DEFINED USE_AVX2 AND NOT USE_AVX2)
+ set(FAISS_OPT_LEVEL "generic" CACHE STRING "FAISS CPU dispatch level"
FORCE)
+ set(NO_AVX2 ON CACHE BOOL "Disable AVX2 support in OpenBLAS" FORCE)
+ set(NO_AVX ON CACHE BOOL "Disable AVX support in OpenBLAS" FORCE)
+else()
+ set(FAISS_OPT_LEVEL "avx2" CACHE STRING "FAISS CPU dispatch level" FORCE)
+ set(NO_AVX OFF CACHE BOOL "Disable AVX support in OpenBLAS" FORCE)
+ set(NO_AVX2 OFF CACHE BOOL "Disable AVX2 support in OpenBLAS" FORCE)
+endif()
# EXCLUDE_FROM_ALL so that binary in faiss is not installed.
add_subdirectory(${PROJECT_SOURCE_DIR}/../contrib/faiss
${PROJECT_BINARY_DIR}/faiss EXCLUDE_FROM_ALL)
\ No newline at end of file
diff --git a/contrib/faiss b/contrib/faiss
index eb245ae0bff..0276f0bb7e4 160000
--- a/contrib/faiss
+++ b/contrib/faiss
@@ -1 +1 @@
-Subproject commit eb245ae0bffb7f871c08c2f2db6ca9d01311a9f4
+Subproject commit 0276f0bb7e4fc0694fe44f450f4f5cfbcb4dd5cc
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]