Skip to content

Instantly share code, notes, and snippets.

@thewh1teagle
Created December 31, 2023 17:41
Show Gist options
  • Select an option

  • Save thewh1teagle/a99055559a96521963dc061d2328465b to your computer and use it in GitHub Desktop.

Select an option

Save thewh1teagle/a99055559a96521963dc061d2328465b to your computer and use it in GitHub Desktop.
Build faiss on windows in msys2
  1. Download msys2 from https://www.msys2.org/
  2. Install dependencies
pacman --needed -S $MINGW_PACKAGE_PREFIX-{toolchain,cmake,make,swig,autotools,lapack} git
  1. Clone & Build
git clone https://github.com/facebookresearch/faiss
cd faiss
mkdir build && cd build
cmake -G "MinGW Makefiles" .. -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DCMAKE_CXX_FLAGS="-march=x86-64" -DCMAKE_C_FLAGS="-march=x86-64" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off
mingw32-make.exe -j16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment