Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9888322
updated v1.10.0
regro-cf-autotick-bot Jan 31, 2025
53a2065
MNT: Re-rendered with conda-build 25.1.1, conda-smithy 3.45.4, and co…
regro-cf-autotick-bot Jan 31, 2025
05b7e32
rebase patches
h-vetinari Jan 31, 2025
b8c2f1b
also build faiss_example_external_module
h-vetinari Jan 31, 2025
4a41d69
MNT: Re-rendered with conda-build 25.1.2, conda-smithy 3.47.0, and co…
Mar 25, 2025
b57f4da
Update recipe/meta.yaml
hmaarrfk Mar 25, 2025
ce28bde
add mkl/generic builds
hmaarrfk Mar 25, 2025
0a15f92
build mkl/non-mkl variants
hmaarrfk Mar 25, 2025
fc981fe
MNT: Re-rendered with conda-build 25.1.2, conda-smithy 3.47.0, and co…
Mar 25, 2025
edcf74c
remote test.
hmaarrfk Mar 25, 2025
0abaad3
MNT: Re-rendered with conda-smithy 3.56.3 and conda-forge-pinning 202…
weiji14 Mar 15, 2026
ac23e51
Remove CUDA 11.8 skip
weiji14 Mar 15, 2026
5fda235
Set Python_NumPy_INCLUDE_DIR to $SP_DIR/numpy/_core/include for NumPy 2
weiji14 Mar 15, 2026
5a2e6a2
Skip tests failing on NumPy 2
weiji14 Mar 16, 2026
68d0c28
Merge branch 'main' into 1.10.0_hb2f3eb
weiji14 Mar 16, 2026
77c8d6a
Update doc_url to https://faiss.ai/
weiji14 Mar 16, 2026
30cfa03
Tidy up BLAS and OpenMP variant handling
weiji14 Mar 16, 2026
fd33e44
MNT: Re-rendered with conda-smithy 3.56.3 and conda-forge-pinning 202…
weiji14 Mar 16, 2026
54dcc59
More blas and openmp cleanups
weiji14 Mar 16, 2026
2379e0e
Remove conda_build_config.yaml with blas_impl settings
weiji14 Mar 16, 2026
34899b4
MNT: Re-rendered with conda-smithy 3.56.3 and conda-forge-pinning 202…
weiji14 Mar 16, 2026
9661464
Skip some more tests on Windows
weiji14 Mar 16, 2026
4c6d820
Replace libblas, libcblas, liblapack, mkl-devel, etc with blas-devel
weiji14 Mar 16, 2026
e2b2d63
MNT: Re-rendered with conda-smithy 3.56.3 and conda-forge-pinning 202…
weiji14 Mar 16, 2026
198d79b
Set proper build regex with blas_impl for blas-devel
weiji14 Mar 16, 2026
86736f0
Set FAISS_ENABLE_GPU env variable properly
weiji14 Mar 17, 2026
2c551c4
Skip windows CUDA builds
weiji14 Mar 17, 2026
e5a67ae
MNT: Re-rendered with conda-smithy 3.56.3 and conda-forge-pinning 202…
weiji14 Mar 17, 2026
a4b76f1
Skip some more tests on win and osx
weiji14 Mar 17, 2026
ff7670f
Don't build faiss_example_external_module
weiji14 Mar 17, 2026
644aa82
Add intel-openmp for win + mkl build
weiji14 Mar 17, 2026
7fade5d
Revert "Don't build faiss_example_external_module"
weiji14 Mar 17, 2026
81d61b8
Remove win selector on libcublas-dev
weiji14 Mar 17, 2026
05e92b5
Temporarily build for CUDA_ARCH 86 only
weiji14 Mar 17, 2026
b163646
Skip tests that segfault on Linux + CUDA or Windows + MKL
weiji14 Mar 17, 2026
83e87d3
Merge branch 'main' into 1.10.0_hb2f3eb
weiji14 Mar 17, 2026
e4262a9
lint
weiji14 Mar 17, 2026
d1add10
Prefix proc_type and include blas_impl in build string
weiji14 Mar 18, 2026
7426174
Skip more segfaulting tests on linux and windows
weiji14 Mar 18, 2026
24a0c39
Move intel-openmp to libfaiss's host deps
weiji14 Mar 18, 2026
428a985
Comment out test skips under windows + mkl + no cuda
weiji14 Mar 18, 2026
182b4f2
Try using _openmp_mutex instead of llvm-openmp or intel-openmp
weiji14 Mar 18, 2026
b902b2c
Just use llvm-openmp for all platforms
weiji14 Mar 18, 2026
5c11583
Use llvm-openmp for osx and linux, libgomp for win
weiji14 Mar 19, 2026
d478021
Revert back to intel-openmp on win+mkl and reinstate test skips
weiji14 Mar 19, 2026
ea7d0a3
Skip WIndows + MKL builds for now
weiji14 Mar 19, 2026
cb670b4
MNT: Re-rendered with conda-smithy 3.57.0 and conda-forge-pinning 202…
weiji14 Mar 19, 2026
482ebfb
Revert "Temporarily build for CUDA_ARCH 86 only"
weiji14 Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64-cuda11.8:ubi8
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64-cuda11.8:ubi8
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64:alma9
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-x86_64-cuda11.8:ubi8
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cuda_compiler_version:
cxx_compiler:
- vs2019
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cuda_compiler_version:
cxx_compiler:
- vs2019
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cuda_compiler_version:
cxx_compiler:
- vs2019
libblas:
- 3.9 *netlib
- 3.9.* *netlib
liblapack:
- 3.9 *netlib
- 3.9.* *netlib
numpy:
- '1.22'
- '1.23'
Expand Down
5 changes: 5 additions & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion recipe/build-pkg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cmake -G Ninja ^
../faiss/python
if %ERRORLEVEL% neq 0 exit 1

cmake --build . --target swigfaiss --config Release -j %CPU_COUNT%
cmake --build . --target swigfaiss faiss_example_external_module --config Release -j %CPU_COUNT%
if %ERRORLEVEL% neq 0 exit 1

:: Build actual python module.
Expand Down
2 changes: 1 addition & 1 deletion recipe/build-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cmake -G Ninja \
-DPython_NumPy_INCLUDE_DIR=$SP_DIR/numpy/core/include \
../faiss/python

cmake --build . --target swigfaiss -j $CPU_COUNT
cmake --build . --target swigfaiss faiss_example_external_module -j $CPU_COUNT

# Build actual python module.
$PYTHON setup.py install --single-version-externally-managed --record=record.txt --prefix=$PREFIX
Expand Down
16 changes: 6 additions & 10 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "1.9.0" %}
{% set version = "1.10.0" %}
# see github.com/conda-forge/conda-forge.github.io/issues/1059 for naming discussion
{% set faiss_proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %}

Expand Down Expand Up @@ -41,7 +41,7 @@ package:

source:
url: https://github.com/facebookresearch/faiss/archive/v{{ version }}.tar.gz
sha256: f6721f1a479b0bdd8547e5bb0dbfa872643e7ea37686c6bf6fc99fb933b3fe4f
sha256: 18a1604867021641cb3bafcd9fbca4df944fd65e45747e186b69c7e7f72d0f3b
Comment thread
hmaarrfk marked this conversation as resolved.
Outdated
patches:
- patches/0001-adapt-header-target-directory-to-outputname.patch
# patch for avoiding crash in GPU test suite on windows
Expand All @@ -56,17 +56,13 @@ source:
- patches/0006-no-more-Release-subfolder.patch
# more fixes
- patches/0007-fix-index-type-in-openmp-loop.patch
# compare https://github.com/facebookresearch/faiss/pull/2927
- patches/0008-loosen-test-tolerance-in-test_ivf_train_2level.patch
- patches/0009-don-t-hide-faiss-gpu-symbols-temporarily-install-fai.patch # [win]
- patches/0010-don-t-rely-on-luck-for-initialization-order-on-win-C.patch # [win and cuda_compiler_version != "None"]
- patches/0008-don-t-hide-faiss-gpu-symbols-temporarily-install-fai.patch # [win]
- patches/0009-don-t-rely-on-luck-for-initialization-order-on-win-C.patch # [win and cuda_compiler_version != "None"]
# workaround for https://github.com/facebookresearch/faiss/issues/2985
- patches/0011-fix-a-MSVC-problem.patch # [win and cuda_compiler_version != "None"]
# backport https://github.com/facebookresearch/faiss/pull/4010 for missing headers
- patches/0012-Some-chore-fixes-4010.patch
- patches/0010-fix-a-MSVC-problem.patch # [win and cuda_compiler_version != "None"]
# disable library dispatch based on detected CPU instruction sets;
# revisit this after (or when) #23 is fixed
- patches/0013-disable-loading-different-library-flavours-based-on-.patch
- patches/0011-disable-loading-different-library-flavours-based-on-.patch

build:
number: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From b10e7de1831aeb28348b55383c3e139eac9ede00 Mon Sep 17 00:00:00 2001
From 0887bdb21ebdc9e98753aa4fa97c6bc68ed44810 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sun, 14 Feb 2021 15:52:27 +0100
Subject: [PATCH 01/13] adapt header target directory to outputname
Subject: [PATCH 01/11] adapt header target directory to outputname

---
faiss/CMakeLists.txt | 20 ++++++++++++++++----
faiss/gpu/CMakeLists.txt | 9 ++++++++-
2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt
index 2871d9747..fbd17a23b 100644
index 6e9eb883..99d8285e 100644
--- a/faiss/CMakeLists.txt
+++ b/faiss/CMakeLists.txt
@@ -233,9 +233,14 @@ endif()
@@ -242,9 +242,14 @@ endif()
set(FAISS_HEADERS ${FAISS_HEADERS} PARENT_SCOPE)

add_library(faiss ${FAISS_SRC})
+set_target_properties(faiss PROPERTIES OUTPUT_NAME "faiss")

add_library(faiss_avx2 ${FAISS_SRC})
-if(NOT FAISS_OPT_LEVEL STREQUAL "avx2" AND NOT FAISS_OPT_LEVEL STREQUAL "avx512")
-if(NOT FAISS_OPT_LEVEL STREQUAL "avx2" AND NOT FAISS_OPT_LEVEL STREQUAL "avx512" AND NOT FAISS_OPT_LEVEL STREQUAL "avx512_spr")
+set_target_properties(faiss_avx2 PROPERTIES OUTPUT_NAME "faiss_avx2")
+
+if(FAISS_OPT_LEVEL STREQUAL "avx2")
Expand All @@ -28,7 +28,7 @@ index 2871d9747..fbd17a23b 100644
set_target_properties(faiss_avx2 PROPERTIES EXCLUDE_FROM_ALL TRUE)
endif()
if(NOT WIN32)
@@ -373,6 +378,13 @@ else()
@@ -394,6 +399,13 @@ else()
target_link_libraries(faiss_sve PRIVATE ${LAPACK_LIBRARIES})
endif()

Expand All @@ -42,7 +42,7 @@ index 2871d9747..fbd17a23b 100644
install(TARGETS faiss
EXPORT faiss-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
@@ -405,7 +417,7 @@ endif()
@@ -433,7 +445,7 @@ endif()
foreach(header ${FAISS_HEADERS})
get_filename_component(dir ${header} DIRECTORY )
install(FILES ${header}
Expand All @@ -51,7 +51,7 @@ index 2871d9747..fbd17a23b 100644
)
endforeach()

@@ -422,9 +434,9 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/faiss-config.cmake.in
@@ -450,9 +462,9 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/faiss-config.cmake.in
)
install(FILES ${PROJECT_BINARY_DIR}/cmake/faiss-config.cmake
${PROJECT_BINARY_DIR}/cmake/faiss-config-version.cmake
Expand All @@ -64,11 +64,11 @@ index 2871d9747..fbd17a23b 100644
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${libname}
)
diff --git a/faiss/gpu/CMakeLists.txt b/faiss/gpu/CMakeLists.txt
index b84362266..8a3cc36ef 100644
index 16574aab..bcd8a137 100644
--- a/faiss/gpu/CMakeLists.txt
+++ b/faiss/gpu/CMakeLists.txt
@@ -306,10 +306,17 @@ target_link_libraries(faiss_avx2 PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu
target_link_libraries(faiss_avx512 PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu>")
@@ -309,10 +309,17 @@ target_link_libraries(faiss_avx512 PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_g
target_link_libraries(faiss_avx512_spr PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu>")
target_link_libraries(faiss_sve PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,faiss_gpu>")

+# to distinguish between faiss and faiss_avx2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From ad8cbb02c90f10b5222498024b0000d96dd432df Mon Sep 17 00:00:00 2001
From e3dcf950cfbb74b9997252e115377bfdf1cb6811 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Fri, 19 Feb 2021 14:14:31 +0100
Subject: [PATCH 02/13] skip test_stress for GPU on windows
Subject: [PATCH 02/11] skip test_stress for GPU on windows

---
faiss/gpu/test/test_gpu_basics.py | 2 ++
1 file changed, 2 insertions(+)

diff --git a/faiss/gpu/test/test_gpu_basics.py b/faiss/gpu/test/test_gpu_basics.py
index 4b4024d23..0798c7f6a 100755
index 0156e842..cf9328cc 100755
--- a/faiss/gpu/test/test_gpu_basics.py
+++ b/faiss/gpu/test/test_gpu_basics.py
@@ -6,6 +6,7 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From e7d62b3d0d33d9538b7c83e4abbdd00919868a2a Mon Sep 17 00:00:00 2001
From 2b62a2fe546d13bf06720088c8ce00a6c9931b6c Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Wed, 2 Jun 2021 22:58:19 +0200
Subject: [PATCH 03/13] enable building libfaiss_avx2 without libfaiss
Subject: [PATCH 03/11] enable building libfaiss_avx2 without libfaiss

---
faiss/CMakeLists.txt | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt
index fbd17a23b..53e27d3f1 100644
index 99d8285e..ffab1189 100644
--- a/faiss/CMakeLists.txt
+++ b/faiss/CMakeLists.txt
@@ -385,18 +385,21 @@ else()
@@ -406,18 +406,21 @@ else()
get_target_property(libname faiss OUTPUT_NAME)
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From d47fbe5168ec7c1b5732f3c945bd907de055bbbb Mon Sep 17 00:00:00 2001
From 7f0beb401d2639c5696644adee3219b7eb8dbcbe Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sat, 5 Jun 2021 01:45:14 +0200
Subject: [PATCH 04/13] increase tolerance for marginally failing test
Subject: [PATCH 04/11] increase tolerance for marginally failing test

---
tests/test_residual_quantizer.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_residual_quantizer.py b/tests/test_residual_quantizer.py
index f4381607e..0ce4cffd2 100644
index c9ae4090..a640a8d7 100644
--- a/tests/test_residual_quantizer.py
+++ b/tests/test_residual_quantizer.py
@@ -677,7 +677,7 @@ class TestAdditiveQuantizerWithLUT(unittest.TestCase):
@@ -708,7 +708,7 @@ class TestAdditiveQuantizerWithLUT(unittest.TestCase):
norms = np.zeros(1 << aq.tot_bits, dtype="float32")
aq.compute_centroid_norms(sp(norms))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 78882cdef9eb9c25557460a7f94dcd0067914ff3 Mon Sep 17 00:00:00 2001
From accd9b17d5b53c05c600498d982834cdb6bc686d Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Sat, 5 Jun 2021 16:29:53 +0200
Subject: [PATCH 05/13] add /bigobj to swigfaiss compile options on windows
Subject: [PATCH 05/11] add /bigobj to swigfaiss compile options on windows

---
faiss/python/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)

diff --git a/faiss/python/CMakeLists.txt b/faiss/python/CMakeLists.txt
index aea99af79..298725701 100644
index 3fc46f4c..ec8cfd0a 100644
--- a/faiss/python/CMakeLists.txt
+++ b/faiss/python/CMakeLists.txt
@@ -33,6 +33,8 @@ macro(configure_swigfaiss source)
@@ -32,6 +32,8 @@ macro(configure_swigfaiss source)
set_source_files_properties(${source} PROPERTIES
SWIG_FLAGS -DSWIGWIN
)
Expand Down
12 changes: 6 additions & 6 deletions recipe/patches/0006-no-more-Release-subfolder.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
From f155504480573b6e66cc97f4bd665f0590a653bb Mon Sep 17 00:00:00 2001
From bd0e39e64d0dd7a81f0129f790ee695fb396a0fe Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
Date: Thu, 25 May 2023 22:29:29 +1100
Subject: [PATCH 06/13] no more Release/ subfolder
Subject: [PATCH 06/11] no more Release/ subfolder

---
faiss/python/setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/faiss/python/setup.py b/faiss/python/setup.py
index 46cacc051..68945531a 100644
index 23611cb3..4745b970 100644
--- a/faiss/python/setup.py
+++ b/faiss/python/setup.py
@@ -21,7 +21,7 @@ shutil.copyfile("extra_wrappers.py", "faiss/extra_wrappers.py")
@@ -23,7 +23,7 @@ shutil.copyfile("extra_wrappers.py", "faiss/extra_wrappers.py")
shutil.copyfile("array_conversions.py", "faiss/array_conversions.py")

ext = ".pyd" if platform.system() == 'Windows' else ".so"
-prefix = "Release/" * (platform.system() == 'Windows')
ext = ".pyd" if platform.system() == "Windows" else ".so"
-prefix = "Release/" * (platform.system() == "Windows")
+prefix = ""

swigfaiss_generic_lib = f"{prefix}_swigfaiss{ext}"
Expand Down
Loading