@@ -48,10 +48,13 @@ knowhere_file_glob(
4848 thirdparty/faiss/faiss/impl/fast_scan/impl-avx512.cpp
4949 thirdparty/faiss/faiss/impl/hnsw/avx512.cpp
5050 thirdparty/faiss/faiss/impl/pq_code_distance/pq_code_distance-avx512.cpp
51+ thirdparty/faiss/faiss/impl/binary_hamming/avx512.cpp
5152 thirdparty/faiss/faiss/cppcontrib/knowhere/impl/sq-avx512-fastpath.cpp
5253 thirdparty/faiss/faiss/utils/distances_fused/avx512.cpp
54+ thirdparty/faiss/faiss/utils/hamming_distance/hamming_avx512.cpp
5355 thirdparty/faiss/faiss/utils/simd_impl/distances_avx512.cpp
5456 thirdparty/faiss/faiss/utils/simd_impl/rabitq_avx512.cpp
57+ thirdparty/faiss/faiss/utils/simd_impl/super_kmeans_kernels_avx512.cpp
5558)
5659# Baseline sq-avx512.cpp is pulled in textually by the prelude file, not
5760# compiled directly. Remove it from the generic list so it is not picked
@@ -83,11 +86,14 @@ knowhere_file_glob(
8386 thirdparty/faiss/faiss/impl/fast_scan/impl-avx2.cpp
8487 thirdparty/faiss/faiss/impl/hnsw/avx2.cpp
8588 thirdparty/faiss/faiss/impl/pq_code_distance/pq_code_distance-avx2.cpp
89+ thirdparty/faiss/faiss/impl/binary_hamming/avx2.cpp
8690 thirdparty/faiss/faiss/cppcontrib/knowhere/impl/sq-avx2-fastpath.cpp
8791 thirdparty/faiss/faiss/utils/distances_fused/simdlib_based.cpp
92+ thirdparty/faiss/faiss/utils/hamming_distance/hamming_avx2.cpp
8893 thirdparty/faiss/faiss/utils/simd_impl/distances_avx2.cpp
8994 thirdparty/faiss/faiss/utils/simd_impl/partitioning_avx2.cpp
9095 thirdparty/faiss/faiss/utils/simd_impl/rabitq_avx2.cpp
96+ thirdparty/faiss/faiss/utils/simd_impl/super_kmeans_kernels_avx2.cpp
9197)
9298knowhere_file_glob (
9399 GLOB
@@ -111,7 +117,6 @@ knowhere_file_glob(
111117 thirdparty/faiss/faiss/IndexPQFastScan.cpp
112118 thirdparty/faiss/faiss/IndexIVFFastScan.cpp
113119 thirdparty/faiss/faiss/IndexIVFPQFastScan.cpp
114- thirdparty/faiss/faiss/cppcontrib/knowhere/IndexIVFFastScan.cpp
115120 thirdparty/faiss/faiss/cppcontrib/knowhere/IndexIVFPQFastScan.cpp
116121 thirdparty/faiss/faiss/cppcontrib/knowhere/IVFFastScanIteratorWorkspace.cpp
117122)
@@ -132,8 +137,10 @@ knowhere_file_glob(
132137 FAISS_DD_NEON_SRCS
133138 thirdparty/faiss/faiss/impl/approx_topk/neon.cpp
134139 thirdparty/faiss/faiss/impl/fast_scan/impl-neon.cpp
140+ thirdparty/faiss/faiss/impl/binary_hamming/neon.cpp
135141 thirdparty/faiss/faiss/cppcontrib/knowhere/impl/sq-neon-fastpath.cpp
136142 thirdparty/faiss/faiss/utils/distances_fused/simdlib_based_neon.cpp
143+ thirdparty/faiss/faiss/utils/hamming_distance/hamming_neon.cpp
137144 thirdparty/faiss/faiss/utils/simd_impl/distances_aarch64.cpp
138145 thirdparty/faiss/faiss/utils/simd_impl/partitioning_neon.cpp
139146 thirdparty/faiss/faiss/utils/simd_impl/rabitq_neon.cpp
@@ -175,13 +182,18 @@ knowhere_file_glob(
175182 FAISS_RVV_SRCS
176183 thirdparty/faiss/faiss/cppcontrib/knowhere/impl/*rvv.cpp
177184)
178- # # RVE vanilla Faiss dynamic dispatch related files are not there yet
179- # knowhere_file_glob(
180- # GLOB
181- # FAISS_DD_RVV_SRCS
182- # )
183- # # combine files
184- # list(APPEND FAISS_RVV_SRCS ${FAISS_DD_RVV_SRCS})
185+ # RVV vanilla Faiss dynamic dispatch related files
186+ knowhere_file_glob (
187+ GLOB
188+ FAISS_DD_RVV_SRCS
189+ thirdparty/faiss/faiss/impl/scalar_quantizer/sq-rvv.cpp
190+ thirdparty/faiss/faiss/impl/binary_hamming/rvv.cpp
191+ thirdparty/faiss/faiss/utils/simd_impl/distances_rvv.cpp
192+ thirdparty/faiss/faiss/utils/hamming_distance/hamming_rvv.cpp
193+ thirdparty/faiss/faiss/utils/simd_impl/rabitq_rvv.cpp
194+ )
195+ # combine files
196+ list (APPEND FAISS_RVV_SRCS ${FAISS_DD_RVV_SRCS} )
185197# remove platform files from general files
186198list (REMOVE_ITEM FAISS_SRCS ${FAISS_RVV_SRCS} )
187199
@@ -322,20 +334,14 @@ if(__PPC64)
322334endif ()
323335
324336
325- if (LINUX )
326- set (BLA_VENDOR OpenBLAS)
327- endif ()
328-
329337if (APPLE )
330338 set (BLA_VENDOR Apple )
331- endif ()
332-
333- if (CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" )
334- find_package (OpenBLAS REQUIRED )
335- set (BLAS_LIBRARIES OpenBLAS::OpenBLAS)
336- else ()
337339 find_package (LAPACK REQUIRED )
338340 find_package (BLAS REQUIRED )
341+ else ()
342+ find_package (OpenBLAS CONFIG REQUIRED )
343+ set (BLAS_LIBRARIES OpenBLAS::OpenBLAS)
344+ set (LAPACK_LIBRARIES OpenBLAS::OpenBLAS)
339345endif ()
340346
341347find_package (xxHash REQUIRED )
@@ -489,7 +495,7 @@ if(__RISCV64)
489495 add_dependencies (faiss knowhere_utils )
490496 target_link_libraries (faiss PUBLIC OpenMP::OpenMP_CXX ${BLAS_LIBRARIES}
491497 ${LAPACK_LIBRARIES} knowhere_utils )
492- target_compile_definitions (faiss PRIVATE FINTEGER=int )
498+ target_compile_definitions (faiss PRIVATE FINTEGER=int COMPILE_SIMD_RISCV_RVV )
493499endif ()
494500
495501# generate `faiss` library for PPC64
0 commit comments