mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3197 Reviewed By: mlomeli1 Differential Revision: D52689379 Pulled By: algoriddle fbshipit-source-id: 54e27c6d310d6da14777ae10ae62f46e7076cacf
27 lines
760 B
Bash
27 lines
760 B
Bash
#!/bin/sh
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
set -e
|
|
|
|
|
|
# Build libfaiss.so/libfaiss_avx2.so/libfaiss_avx512.so
|
|
cmake -B _build \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DBUILD_TESTING=OFF \
|
|
-DFAISS_OPT_LEVEL=avx512 \
|
|
-DFAISS_ENABLE_GPU=ON \
|
|
-DFAISS_ENABLE_RAFT=ON \
|
|
-DCMAKE_CUDA_ARCHITECTURES="${CUDA_ARCHS}" \
|
|
-DFAISS_ENABLE_PYTHON=OFF \
|
|
-DBLA_VENDOR=Intel10_64lp \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release .
|
|
|
|
make -C _build -j$(nproc) faiss faiss_avx2 faiss_avx512
|
|
|
|
cmake --install _build --prefix $PREFIX
|
|
cmake --install _build --prefix _libfaiss_stage/
|