diff --git a/cmake/libs/libfaiss.cmake b/cmake/libs/libfaiss.cmake index 1ebca45cc..7153b756b 100644 --- a/cmake/libs/libfaiss.cmake +++ b/cmake/libs/libfaiss.cmake @@ -8,7 +8,9 @@ knowhere_file_glob(GLOB FAISS_AVX512_SRCS knowhere_file_glob(GLOB FAISS_AVX2_SRCS thirdparty/faiss/faiss/impl/*avx.cpp + thirdparty/faiss/faiss/impl/pq4_fast_scan_search_1.cpp thirdparty/faiss/faiss/impl/pq4_fast_scan_search_qbs.cpp + thirdparty/faiss/faiss/IndexPQFastScan.cpp thirdparty/faiss/faiss/IndexIVFPQFastScan.cpp) list(REMOVE_ITEM FAISS_SRCS ${FAISS_AVX512_SRCS}) diff --git a/thirdparty/faiss/faiss/impl/ResidualQuantizer.cpp b/thirdparty/faiss/faiss/impl/ResidualQuantizer.cpp index aa34a09c6..25ad6dee6 100644 --- a/thirdparty/faiss/faiss/impl/ResidualQuantizer.cpp +++ b/thirdparty/faiss/faiss/impl/ResidualQuantizer.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include extern "C" { diff --git a/thirdparty/faiss/faiss/impl/pq4_fast_scan.cpp b/thirdparty/faiss/faiss/impl/pq4_fast_scan.cpp index 97a8f264e..3244c7719 100644 --- a/thirdparty/faiss/faiss/impl/pq4_fast_scan.cpp +++ b/thirdparty/faiss/faiss/impl/pq4_fast_scan.cpp @@ -7,13 +7,12 @@ #include #include -#include +#include #include namespace faiss { -using namespace simd_result_handlers; /*************************************************************** * Packing functions for codes diff --git a/thirdparty/faiss/faiss/utils/hamming-inl.h b/thirdparty/faiss/faiss/utils/hamming-inl.h index 6dadf1876..2f1ac9ca7 100644 --- a/thirdparty/faiss/faiss/utils/hamming-inl.h +++ b/thirdparty/faiss/faiss/utils/hamming-inl.h @@ -6,7 +6,7 @@ */ #include -#include + namespace faiss { extern const uint8_t hamdis_tab_ham_bytes[256]; diff --git a/thirdparty/faiss/faiss/utils/jaccard-inl.h b/thirdparty/faiss/faiss/utils/jaccard-inl.h index 90cf8714b..f6e673580 100644 --- a/thirdparty/faiss/faiss/utils/jaccard-inl.h +++ b/thirdparty/faiss/faiss/utils/jaccard-inl.h @@ -16,7 +16,7 @@ #define FAISS_JACCARD_INL_H #include -#include + namespace faiss { struct JaccardComputer8 { diff --git a/thirdparty/faiss/faiss/utils/partitioning.cpp b/thirdparty/faiss/faiss/utils/partitioning.cpp index b0493051b..45e7dbce5 100644 --- a/thirdparty/faiss/faiss/utils/partitioning.cpp +++ b/thirdparty/faiss/faiss/utils/partitioning.cpp @@ -13,8 +13,9 @@ #include #include #include +#ifdef __AVX2__ #include - +#endif #include namespace faiss { @@ -222,6 +223,7 @@ typename C::T partition_fuzzy_median3( * SIMD routines when vals is an aligned array of uint16_t ******************************************************************/ +#ifdef __AVX2__ namespace simd_partitioning { void find_minimax( @@ -738,6 +740,8 @@ uint16_t simd_partition_with_bounds( } // namespace simd_partitioning +#endif + /****************************************************************** * Driver routine ******************************************************************/