From 6dd10678645b6bbd426c614502c2ba28633ce346 Mon Sep 17 00:00:00 2001 From: Lia Ranon Date: Wed, 25 Sep 2024 20:36:30 -0400 Subject: [PATCH 1/2] Update INSTALL.md to ensure AVX2 and AV512 support for python package --- INSTALL.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 62ab8fa4c9..ec2f9f480b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -177,6 +177,22 @@ $ (cd build/faiss/python && python setup.py install) The first command builds the python bindings for Faiss, while the second one generates and installs the python package. +If making use of optimization options, build the correct target before swigfaiss. + +For AVX2: + +``` shell +$ make -C build -j faiss_avx2 +``` + +For AVX512: + +``` shell +$ make -C build -j faiss_avx512 +``` + +This will ensure the creation of neccesary files when building and installing the python package. + ## Step 4: Installing the C++ library and headers (optional) ``` shell From a7e3a71b2d668940ed5217595130303847eb6c67 Mon Sep 17 00:00:00 2001 From: lranon1 <140350425+lranon1@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:54:06 +0000 Subject: [PATCH 2/2] Change order or instructions for AVX2 and AVX512 support --- INSTALL.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index ec2f9f480b..b8c7e1ee6e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -167,16 +167,6 @@ The `-j` option enables parallel compilation of multiple units, leading to a faster build, but increasing the chances of running out of memory, in which case it is recommended to set the `-j` option to a fixed value (such as `-j4`). -## Step 3: Building the python bindings (optional) - -``` shell -$ make -C build -j swigfaiss -$ (cd build/faiss/python && python setup.py install) -``` - -The first command builds the python bindings for Faiss, while the second one -generates and installs the python package. - If making use of optimization options, build the correct target before swigfaiss. For AVX2: @@ -193,6 +183,17 @@ $ make -C build -j faiss_avx512 This will ensure the creation of neccesary files when building and installing the python package. +## Step 3: Building the python bindings (optional) + +``` shell +$ make -C build -j swigfaiss +$ (cd build/faiss/python && python setup.py install) +``` + +The first command builds the python bindings for Faiss, while the second one +generates and installs the python package. + + ## Step 4: Installing the C++ library and headers (optional) ``` shell