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
25 lines
757 B
Bash
Executable File
25 lines
757 B
Bash
Executable File
#!/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 swigfaiss.so/swigfaiss_avx2.so/swigfaiss_avx512.so
|
|
cmake -B _build_python_${PY_VER} \
|
|
-Dfaiss_ROOT=_libfaiss_stage/ \
|
|
-DFAISS_OPT_LEVEL=avx512 \
|
|
-DFAISS_ENABLE_GPU=ON \
|
|
-DFAISS_ENABLE_RAFT=OFF \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DPython_EXECUTABLE=$PYTHON \
|
|
faiss/python
|
|
|
|
make -C _build_python_${PY_VER} -j$(nproc) swigfaiss swigfaiss_avx2 swigfaiss_avx512
|
|
|
|
# Build actual python module.
|
|
cd _build_python_${PY_VER}/
|
|
$PYTHON setup.py install --single-version-externally-managed --record=record.txt --prefix=$PREFIX
|