faiss版本 faiss-v1.7.4
- cd faiss-v1.7.4
- cmake -B build . -DBUILD_TESTING=OFF -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF
- make -C build -j faiss; 默认安装路径如下
-- Installing: /usr/local/lib64/libfaiss.a
-- Installing: /usr/local/include/faiss/AutoTune.h
-- Installing: /usr/local/include/faiss/Clustering.h
-- Installing: /usr/local/include/faiss/IVFlib.h
-- Installing: /usr/local/include/faiss/Index.h
-- Installing: /usr/local/include/faiss/Index2Layer.h
-- Installing: /usr/local/include/faiss/IndexAdditiveQuantizer.h
-- Installing: /usr/local/include/faiss/IndexBinary.h
-- Installing: /usr/local/include/faiss/IndexBinaryFlat.h
-- Installing: /usr/local/include/faiss/IndexBinaryFromFloat.h
-- Installing: /usr/local/include/faiss/IndexBinaryHNSW.h
-- Installing: /usr/local/include/faiss/IndexBinaryHash.h
-- Installing: /usr/local/include/faiss/IndexBinaryIVF.h
-- Installing: /usr/local/include/faiss/IndexFlat.h
-- Installing: /usr/local/include/faiss/IndexFlatCodes.h
-- Installing: /usr/local/include/faiss/IndexHNSW.h
-- Installing: /usr/local/include/faiss/IndexIDMap.h
-- Installing: /usr/local/include/faiss/IndexIVF.h
-- Installing: /usr/local/include/faiss/IndexIVFAdditiveQuantizer.h
-- Installing: /usr/local/include/faiss/IndexIVFFlat.h
-- Installing: /usr/local/include/faiss/IndexIVFPQ.h
-- Installing: /usr/local/include/faiss/IndexIVFFastScan.h
-- Installing: /usr/local/include/faiss/IndexIVFAdditiveQuantizerFastScan.h
-- Installing: /usr/local/include/faiss/IndexIVFPQFastScan.h
-- Installing: /usr/local/include/faiss/IndexIVFPQR.h
-- Installing: /usr/local/include/faiss/IndexIVFSpectralHash.h
-- Installing: /usr/local/include/faiss/IndexLSH.h
-- Installing: /usr/local/include/faiss/IndexLattice.h
-- Installing: /usr/local/include/faiss/IndexNNDescent.h
-- Installing: /usr/local/include/faiss/IndexNSG.h
-- Installing: /usr/local/include/faiss/IndexPQ.h
-- Installing: /usr/local/include/faiss/IndexFastScan.h
-- Installing: /usr/local/include/faiss/IndexAdditiveQuantizerFastScan.h
-- Installing: /usr/local/include/faiss/IndexPQFastScan.h
-- Installing: /usr/local/include/faiss/IndexPreTransform.h
-- Installing: /usr/local/include/faiss/IndexRefine.h
-- Installing: /usr/local/include/faiss/IndexReplicas.h
-- Installing: /usr/local/include/faiss/IndexRowwiseMinMax.h
-- Installing: /usr/local/include/faiss/IndexScalarQuantizer.h
-- Installing: /usr/local/include/faiss/IndexShards.h
-- Installing: /usr/local/include/faiss/IndexShardsIVF.h
-- Installing: /usr/local/include/faiss/MatrixStats.h
-- Installing: /usr/local/include/faiss/MetaIndexes.h
-- Installing: /usr/local/include/faiss/MetricType.h
-- Installing: /usr/local/include/faiss/VectorTransform.h
-- Installing: /usr/local/include/faiss/clone_index.h
-- Installing: /usr/local/include/faiss/index_factory.h
-- Installing: /usr/local/include/faiss/index_io.h
-- Installing: /usr/local/include/faiss/impl/AdditiveQuantizer.h
-- Installing: /usr/local/include/faiss/impl/AuxIndexStructures.h
-- Installing: /usr/local/include/faiss/impl/IDSelector.h
-- Installing: /usr/local/include/faiss/impl/DistanceComputer.h
-- Installing: /usr/local/include/faiss/impl/FaissAssert.h
-- Installing: /usr/local/include/faiss/impl/FaissException.h
-- Installing: /usr/local/include/faiss/impl/HNSW.h
-- Installing: /usr/local/include/faiss/impl/LocalSearchQuantizer.h
-- Installing: /usr/local/include/faiss/impl/ProductAdditiveQuantizer.h
-- Installing: /usr/local/include/faiss/impl/LookupTableScaler.h
-- Installing: /usr/local/include/faiss/impl/NNDescent.h
-- Installing: /usr/local/include/faiss/impl/NSG.h
-- Installing: /usr/local/include/faiss/impl/PolysemousTraining.h
-- Installing: /usr/local/include/faiss/impl/ProductQuantizer-inl.h
-- Installing: /usr/local/include/faiss/impl/ProductQuantizer.h
-- Installing: /usr/local/include/faiss/impl/Quantizer.h
-- Installing: /usr/local/include/faiss/impl/ResidualQuantizer.h
-- Installing: /usr/local/include/faiss/impl/ResultHandler.h
-- Installing: /usr/local/include/faiss/impl/ScalarQuantizer.h
-- Installing: /usr/local/include/faiss/impl/ThreadedIndex-inl.h
-- Installing: /usr/local/include/faiss/impl/ThreadedIndex.h
-- Installing: /usr/local/include/faiss/impl/io.h
-- Installing: /usr/local/include/faiss/impl/io_macros.h
-- Installing: /usr/local/include/faiss/impl/kmeans1d.h
-- Installing: /usr/local/include/faiss/impl/lattice_Zn.h
-- Installing: /usr/local/include/faiss/impl/platform_macros.h
-- Installing: /usr/local/include/faiss/impl/pq4_fast_scan.h
-- Installing: /usr/local/include/faiss/impl/simd_result_handlers.h
-- Installing: /usr/local/include/faiss/impl/code_distance/code_distance.h
-- Installing: /usr/local/include/faiss/impl/code_distance/code_distance-generic.h
-- Installing: /usr/local/include/faiss/impl/code_distance/code_distance-avx2.h
-- Installing: /usr/local/include/faiss/invlists/BlockInvertedLists.h
-- Installing: /usr/local/include/faiss/invlists/DirectMap.h
-- Installing: /usr/local/include/faiss/invlists/InvertedLists.h
-- Installing: /usr/local/include/faiss/invlists/InvertedListsIOHook.h
-- Installing: /usr/local/include/faiss/utils/AlignedTable.h
-- Installing: /usr/local/include/faiss/utils/Heap.h
-- Installing: /usr/local/include/faiss/utils/WorkerThread.h
-- Installing: /usr/local/include/faiss/utils/distances.h
-- Installing: /usr/local/include/faiss/utils/extra_distances-inl.h
-- Installing: /usr/local/include/faiss/utils/extra_distances.h
-- Installing: /usr/local/include/faiss/utils/fp16-fp16c.h
-- Installing: /usr/local/include/faiss/utils/fp16-inl.h
-- Installing: /usr/local/include/faiss/utils/fp16.h
-- Installing: /usr/local/include/faiss/utils/hamming-inl.h
-- Installing: /usr/local/include/faiss/utils/hamming.h
-- Installing: /usr/local/include/faiss/utils/ordered_key_value.h
-- Installing: /usr/local/include/faiss/utils/partitioning.h
-- Installing: /usr/local/include/faiss/utils/quantize_lut.h
-- Installing: /usr/local/include/faiss/utils/random.h
-- Installing: /usr/local/include/faiss/utils/simdlib.h
-- Installing: /usr/local/include/faiss/utils/simdlib_avx2.h
-- Installing: /usr/local/include/faiss/utils/simdlib_emulated.h
-- Installing: /usr/local/include/faiss/utils/simdlib_neon.h
-- Installing: /usr/local/include/faiss/utils/utils.h
-- Installing: /usr/local/include/faiss/utils/distances_fused/avx512.h
-- Installing: /usr/local/include/faiss/utils/distances_fused/distances_fused.h
-- Installing: /usr/local/include/faiss/utils/distances_fused/simdlib_based.h
-- Installing: /usr/local/include/faiss/utils/approx_topk/approx_topk.h
-- Installing: /usr/local/include/faiss/utils/approx_topk/avx2-inl.h
-- Installing: /usr/local/include/faiss/utils/approx_topk/generic.h
-- Installing: /usr/local/include/faiss/utils/approx_topk/mode.h
-- Installing: /usr/local/include/faiss/utils/approx_topk_hamming/approx_topk_hamming.h
-- Installing: /usr/local/include/faiss/utils/transpose/transpose-avx2-inl.h
-- Installing: /usr/local/include/faiss/utils/hamming_distance/common.h
-- Installing: /usr/local/include/faiss/utils/hamming_distance/generic-inl.h
-- Installing: /usr/local/include/faiss/utils/hamming_distance/hamdis-inl.h
-- Installing: /usr/local/include/faiss/utils/hamming_distance/neon-inl.h
-- Installing: /usr/local/include/faiss/utils/hamming_distance/avx2-inl.h
-- Installing: /usr/local/include/faiss/invlists/OnDiskInvertedLists.h
-- Installing: /usr/local/share/faiss/faiss-config.cmake
-- Installing: /usr/local/share/faiss/faiss-config-version.cmake
-- Installing: /usr/local/share/faiss/faiss-targets.cmake
-- Installing: /usr/local/share/faiss/faiss-targets-noconfig.cmake
demo
- bin编译 make -C build demo_ivfpq_indexing
- 执行 ./build/demos/demo_ivfpq_indexing
注:
cmake指定版本下载链接:我使用的版本cmake-3.28.0-rc6-linux-x86_64;Index of /fileshttps://cmake.org/files/
参考:faiss/INSTALL.md at main · facebookresearch/faiss · GitHub