From df91dd3397c7c0f629c03572f3fea57e7f53d900 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Wed, 6 May 2026 09:35:25 -0600 Subject: [PATCH 01/11] Try setting explicit openmp implementations. --- abs.yaml | 3 +++ recipe/meta.yaml | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/abs.yaml b/abs.yaml index 71fe451c..c36591b2 100644 --- a/abs.yaml +++ b/abs.yaml @@ -1,3 +1,6 @@ # Increase timeout for CUDA builds which compile for multiple GPU architectures # Default is 7200 seconds (2 hours), which is insufficient for Windows CUDA builds task_timeout: 14400 # 4 hours + +channels: + - build diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3fac66fa..bff9b5bc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "1.14.1" %} -{% set build_number = 0 %} +{% set build_number = 1 %} # 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" %} @@ -150,9 +150,11 @@ requirements: - cmake - ninja-base # libgomp is required for linux-64 alongside intel-omp. - - libgomp # [linux] - # llvm-openmp is required only for osx - - llvm-openmp {{ cxx_compiler_version }} # [osx] + - libgomp # [blas_impl != "mkl" and linux] + # llvm-openmp is required only for osx or win-arm64 + - llvm-openmp {{ cxx_compiler_version }} # [osx or (win and arm64)] + - intel-openmp # [blas_impl == "mkl"] + - vcomp14 # [blas_impl != "mkl" and (win and x86_64)] host: - python # BLAS dependencies based on variant From 32d5c3a7d09ed9a7f598b1fa5ed24b0d2a21b1d0 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Wed, 6 May 2026 10:49:09 -0600 Subject: [PATCH 02/11] Re-work openmp implementation --- recipe/build-lib.sh | 18 +++++--- recipe/build-pkg.sh | 80 +++++++++++++--------------------- recipe/conda_build_config.yaml | 4 +- recipe/meta.yaml | 39 +++++++++-------- 4 files changed, 64 insertions(+), 77 deletions(-) diff --git a/recipe/build-lib.sh b/recipe/build-lib.sh index c8c2d95a..1a8fc764 100644 --- a/recipe/build-lib.sh +++ b/recipe/build-lib.sh @@ -6,12 +6,18 @@ cd ${SRC_DIR} function version2int { echo "$@" | awk -F. '{ printf("%d%02d\n", $1, $2); }'; } declare -a EXTRA_CMAKE_ARGS -# Cross builds (linux-aarch64, linux-ppc64le, linux-s390x, osx-arm64) link -# against OpenBLAS instead of MKL. Force FindBLAS to use OpenBLAS so it does -# not attempt to run detection binaries on the build host (which fails when -# cross compiling). Also hand CMake the actual library path so it does not try -# to execute detection binaries under emulation. -if [[ "${target_platform}" == linux-aarch64 || "${target_platform}" == osx-arm64 ]]; then +if [[ "${target_platform}" == osx-* ]]; then + EXTRA_CMAKE_ARGS+=( + -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp" + -DOpenMP_CXX_LIB_NAMES=omp + -DOpenMP_omp_LIBRARY="$PREFIX/lib/libomp.dylib" + ) +fi + +# Force FindBLAS to use the selected OpenBLAS variant instead of probing other +# BLAS implementations. Hand CMake the actual library path so cross builds do +# not try to execute detection binaries under emulation. +if [[ "${blas_impl}" == "openblas" ]]; then EXTRA_CMAKE_ARGS+=(-DBLA_VENDOR=OpenBLAS) if [[ "${target_platform}" == osx-arm64 ]]; then EXTRA_CMAKE_ARGS+=( diff --git a/recipe/build-pkg.sh b/recipe/build-pkg.sh index e68d98a9..eca6e641 100644 --- a/recipe/build-pkg.sh +++ b/recipe/build-pkg.sh @@ -10,60 +10,40 @@ else FAISS_ENABLE_GPU="OFF" fi -# Build vanilla version (no avx2), see build-lib.sh -if [[ "${target_platform}" == "osx-64" ]]; then - cmake -G Ninja \ - ${CMAKE_ARGS} \ - -Dfaiss_ROOT=_libfaiss_generic_stage/ \ - -DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \ - -DOpenMP_CXX_FLAGS=-fopenmp=libiomp5 \ - -DOpenMP_CXX_LIB_NAMES=libiomp5 \ - -DOpenMP_libiomp5_LIBRARY=$PREFIX/lib/libiomp5.dylib \ - -DCMAKE_BUILD_TYPE=Release \ - -DPython_EXECUTABLE="${PYTHON}" \ - -B _build_python_generic \ - faiss/python - cmake --build _build_python_generic --target swigfaiss -j $CPU_COUNT -else - cmake -G Ninja \ - ${CMAKE_ARGS} \ - -Dfaiss_ROOT=_libfaiss_generic_stage/ \ - -DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \ - -DCMAKE_BUILD_TYPE=Release \ - -DPython_EXECUTABLE="${PYTHON}" \ - -B _build_python_generic \ - faiss/python - cmake --build _build_python_generic --target swigfaiss -j $CPU_COUNT +declare -a OPENMP_CMAKE_ARGS +if [[ "${target_platform}" == osx-* ]]; then + OPENMP_CMAKE_ARGS+=( + -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp" + -DOpenMP_CXX_LIB_NAMES=omp + -DOpenMP_omp_LIBRARY="$PREFIX/lib/libomp.dylib" + ) fi +# Build vanilla version (no avx2), see build-lib.sh +cmake -G Ninja \ + ${CMAKE_ARGS} \ + ${OPENMP_CMAKE_ARGS+"${OPENMP_CMAKE_ARGS[@]}"} \ + -Dfaiss_ROOT=_libfaiss_generic_stage/ \ + -DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \ + -DCMAKE_BUILD_TYPE=Release \ + -DPython_EXECUTABLE="${PYTHON}" \ + -B _build_python_generic \ + faiss/python +cmake --build _build_python_generic --target swigfaiss -j $CPU_COUNT + # Build version with avx2 support, see build-lib.sh if [[ "${target_platform}" == *-64 ]]; then - if [[ "${target_platform}" == "osx-64" ]]; then - cmake -G Ninja \ - ${CMAKE_ARGS} \ - -Dfaiss_ROOT=_libfaiss_avx2_stage/ \ - -DOpenMP_CXX_FLAGS=-fopenmp=libiomp5 \ - -DOpenMP_CXX_LIB_NAMES=libiomp5 \ - -DOpenMP_libiomp5_LIBRARY=$PREFIX/lib/libiomp5.dylib \ - -DFAISS_OPT_LEVEL=avx2 \ - -DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \ - -DCMAKE_BUILD_TYPE=Release \ - -DPython_EXECUTABLE="${PYTHON}" \ - -B _build_python_avx2 \ - faiss/python - cmake --build _build_python_avx2 --target swigfaiss_avx2 -j $CPU_COUNT - else - cmake -G Ninja \ - ${CMAKE_ARGS} \ - -Dfaiss_ROOT=_libfaiss_avx2_stage/ \ - -DFAISS_OPT_LEVEL=avx2 \ - -DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \ - -DCMAKE_BUILD_TYPE=Release \ - -DPython_EXECUTABLE="${PYTHON}" \ - -B _build_python_avx2 \ - faiss/python - cmake --build _build_python_avx2 --target swigfaiss_avx2 -j $CPU_COUNT - fi + cmake -G Ninja \ + ${CMAKE_ARGS} \ + ${OPENMP_CMAKE_ARGS+"${OPENMP_CMAKE_ARGS[@]}"} \ + -Dfaiss_ROOT=_libfaiss_avx2_stage/ \ + -DFAISS_OPT_LEVEL=avx2 \ + -DFAISS_ENABLE_GPU=${FAISS_ENABLE_GPU} \ + -DCMAKE_BUILD_TYPE=Release \ + -DPython_EXECUTABLE="${PYTHON}" \ + -B _build_python_avx2 \ + faiss/python + cmake --build _build_python_avx2 --target swigfaiss_avx2 -j $CPU_COUNT # copy generated swig module with avx2-support to specifically named file, cf. # https://github.com/facebookresearch/faiss/blob/v1.7.1/faiss/python/setup.py#L37-L40 diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index faee3cdf..172fdaf9 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -29,8 +29,8 @@ numpy: - 2.1 # [not osx] blas_impl: - - mkl # [not (aarch64 or arm64)] - - openblas # [aarch64 or arm64] + - mkl # [not (aarch64 or arm64 or osx)] + - openblas # [aarch64 or arm64 or osx] zip_keys: # [win] - # [win] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index bff9b5bc..52f5a0d6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -149,19 +149,17 @@ requirements: - m2-patch # [win] - cmake - ninja-base - # libgomp is required for linux-64 alongside intel-omp. - - libgomp # [blas_impl != "mkl" and linux] - # llvm-openmp is required only for osx or win-arm64 - - llvm-openmp {{ cxx_compiler_version }} # [osx or (win and arm64)] - - intel-openmp # [blas_impl == "mkl"] - - vcomp14 # [blas_impl != "mkl" and (win and x86_64)] + - llvm-openmp {{ cxx_compiler_version }} # [blas_impl == "openblas" and osx] + - intel-openmp # [blas_impl == "mkl" and (linux or win)] host: - python # BLAS dependencies based on variant - openblas-devel {{ openblas }} # [blas_impl == "openblas"] + - libgomp # [blas_impl == "openblas" and linux] + - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - mkl-devel {{ mkl }} # [blas_impl == "mkl"] - mkl {{ mkl }} # [blas_impl == "mkl"] - - intel-openmp # [blas_impl == "mkl" and (linux64 or win)] + - intel-openmp # [blas_impl == "mkl" and (linux or win)] outputs: # A meta-package to select CPU or GPU build for faiss. @@ -210,19 +208,18 @@ outputs: - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] - cmake - ninja-base - # libgomp is required for linux-64 alongside intel-omp. - - libgomp # [linux] - # llvm-openmp is required only for osx - - llvm-openmp {{ cxx_compiler_version }} # [osx] + - llvm-openmp {{ cxx_compiler_version }} # [blas_impl == "openblas" and osx] host: # NOTE: Do NOT add python here - libfaiss is a C++ library and should not # depend on python_abi. Adding python causes the package to be tied to a # specific Python version, breaking installation for other Python versions. # BLAS dependencies based on variant - openblas-devel {{ openblas }} # [blas_impl == "openblas"] + - libgomp # [blas_impl == "openblas" and linux] + - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - mkl-devel {{ mkl }} # [blas_impl == "mkl"] - mkl {{ mkl }} # [blas_impl == "mkl"] - - intel-openmp # [blas_impl == "mkl" and (linux64 or win)] + - intel-openmp # [blas_impl == "mkl" and (linux or win)] # CUDA dependencies for GPU builds - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] - cuda-cudart-dev # [cuda_compiler_version != "None"] @@ -232,9 +229,11 @@ outputs: run: # Run dependencies based on variant - libopenblas # [blas_impl == "openblas"] + - libgomp # [blas_impl == "openblas" and linux] + - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - mkl {{ mkl }}.* # [blas_impl == "mkl"] - {{ pin_compatible('intel-openmp') }} # [blas_impl == "mkl" and (linux64 or win)] - - llvm-openmp # [osx] + - llvm-openmp # [blas_impl == "openblas" and osx] run_constrained: - faiss-cpu ==9999999999 # [cuda_compiler_version != "None"] - faiss-gpu ==9999999999 # [cuda_compiler_version == "None"] @@ -278,10 +277,7 @@ outputs: - swig - cmake - ninja-base - # libgomp is required for linux-64 alongside intel-omp. - - libgomp # [linux] - # llvm-openmp is required only for osx - - llvm-openmp {{ cxx_compiler_version }} # [osx] + - llvm-openmp {{ cxx_compiler_version }} # [blas_impl == "openblas" and osx] host: - python - wheel @@ -290,7 +286,10 @@ outputs: - pip - numpy {{ numpy }} - openblas-devel {{ openblas }} # [blas_impl == "openblas"] - # MKL for win, linux-64, and osx-64. All require intel-openmp. + - libgomp # [blas_impl == "openblas" and linux] + - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] + # MKL is used on win and linux x86_64; macOS uses OpenBLAS to avoid + # mixing llvm-openmp with intel-openmp. - mkl-devel {{ mkl }} # [blas_impl == "mkl"] # CUDA dependencies for GPU builds (needed for SWIG wrapper compilation) - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] @@ -306,8 +305,10 @@ outputs: - packaging # bounds through run_exports - libopenblas # [blas_impl == "openblas"] + - libgomp # [blas_impl == "openblas" and linux] + - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - mkl # [blas_impl == "mkl"] - - llvm-openmp # [osx] + - llvm-openmp # [blas_impl == "openblas" and osx] run_constrained: - faiss-cpu ==9999999999 # [cuda_compiler_version != "None"] - faiss-gpu ==9999999999 # [cuda_compiler_version == "None"] From 971f97d301141ea2ade7313a1f7e365785bcec68 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Wed, 6 May 2026 14:24:17 -0600 Subject: [PATCH 03/11] Update conda_build_config.yaml --- recipe/conda_build_config.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 172fdaf9..11460e7f 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -2,12 +2,8 @@ # vs2019 doesn't support C++20 template lambdas; vs2022 required for all variants. c_compiler: # [win] - vs2022 # [win] - - vs2022 # [win] - - vs2022 # [win] cxx_compiler: # [win] - vs2022 # [win] - - vs2022 # [win] - - vs2022 # [win] cuda_compiler_version: - None # CPU variant - always built @@ -31,9 +27,3 @@ numpy: blas_impl: - mkl # [not (aarch64 or arm64 or osx)] - openblas # [aarch64 or arm64 or osx] - -zip_keys: # [win] - - # [win] - - cuda_compiler_version # [win] - - c_compiler # [win] - - cxx_compiler # [win] From 9e58e10a137f01a7f99ef3f9dd9186277b59d4f8 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Wed, 6 May 2026 17:12:30 -0600 Subject: [PATCH 04/11] Cleanup cbc --- recipe/conda_build_config.yaml | 26 +------------------------- recipe/meta.yaml | 7 +++---- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 11460e7f..a725736f 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,29 +1,5 @@ -# faiss v1.14.1 requires C++20 on MSVC (template lambdas in simd_dispatch.h). -# vs2019 doesn't support C++20 template lambdas; vs2022 required for all variants. -c_compiler: # [win] - - vs2022 # [win] -cxx_compiler: # [win] - - vs2022 # [win] cuda_compiler_version: - None # CPU variant - always built - "12.9" # [win or linux] - - "13.1" # [win or linux] - -# Python 3.13 builds currently fail on macOS (upstream SWIG bindings not ready). -# Upstream issue: https://github.com/facebookresearch/faiss/issues/3985 -python: - - 3.10 - - "3.11" - - "3.12" - - "3.13" # [not osx] - -numpy: - - 2.1 - - 2.1 - - 2.1 - - 2.1 # [not osx] - -blas_impl: - - mkl # [not (aarch64 or arm64 or osx)] - - openblas # [aarch64 or arm64 or osx] + - "13.0" # [win or linux] \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 52f5a0d6..e96febfd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -135,10 +135,9 @@ source: build: number: {{ build_number + 100 }} # [cuda_compiler_version != "None"] number: {{ build_number }} # [cuda_compiler_version == "None"] - # some MKL issue for py 3.8 on osx-64 - skip: true # [py<38 or (py==38 and osx and x86_64)] - # Too many tests are failing on s390x. - skip: true # [linux and (s390x or ppc64le)] + # Python 3.13 builds currently fail on macOS (upstream SWIG bindings not ready). + # Upstream issue: https://github.com/facebookresearch/faiss/issues/3985 + skip: true # [osx and py>=3.13] requirements: build: From afac04d84c8ea83977841d785e3ae985a71f4b5d Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Wed, 6 May 2026 17:58:58 -0600 Subject: [PATCH 05/11] Try to force intel-openmp for mkl builds. --- recipe/build-lib.sh | 10 +++++++ recipe/build-pkg.sh | 10 +++++++ recipe/meta.yaml | 68 ++++++++++++++++++++++----------------------- 3 files changed, 54 insertions(+), 34 deletions(-) diff --git a/recipe/build-lib.sh b/recipe/build-lib.sh index 1a8fc764..3fc2904f 100644 --- a/recipe/build-lib.sh +++ b/recipe/build-lib.sh @@ -12,6 +12,16 @@ if [[ "${target_platform}" == osx-* ]]; then -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY="$PREFIX/lib/libomp.dylib" ) +elif [[ "${target_platform}" == linux-* && "${blas_impl}" == "mkl" ]]; then + OPENMP_CXX_FLAG="-fopenmp" + if [[ "${CXX:-}" == *icpx* || "${CXX:-}" == *icpc* || "${CXX:-}" == *icc* ]]; then + OPENMP_CXX_FLAG="-qopenmp" + fi + EXTRA_CMAKE_ARGS+=( + -DOpenMP_CXX_FLAGS="${OPENMP_CXX_FLAG}" + -DOpenMP_CXX_LIB_NAMES=iomp5 + -DOpenMP_iomp5_LIBRARY="$PREFIX/lib/libiomp5.so" + ) fi # Force FindBLAS to use the selected OpenBLAS variant instead of probing other diff --git a/recipe/build-pkg.sh b/recipe/build-pkg.sh index eca6e641..29205fa2 100644 --- a/recipe/build-pkg.sh +++ b/recipe/build-pkg.sh @@ -17,6 +17,16 @@ if [[ "${target_platform}" == osx-* ]]; then -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY="$PREFIX/lib/libomp.dylib" ) +elif [[ "${target_platform}" == linux-* && "${blas_impl}" == "mkl" ]]; then + OPENMP_CXX_FLAG="-fopenmp" + if [[ "${CXX:-}" == *icpx* || "${CXX:-}" == *icpc* || "${CXX:-}" == *icc* ]]; then + OPENMP_CXX_FLAG="-qopenmp" + fi + OPENMP_CMAKE_ARGS+=( + -DOpenMP_CXX_FLAGS="${OPENMP_CXX_FLAG}" + -DOpenMP_CXX_LIB_NAMES=iomp5 + -DOpenMP_iomp5_LIBRARY="$PREFIX/lib/libiomp5.so" + ) fi # Build vanilla version (no avx2), see build-lib.sh diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e96febfd..f81ba569 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -161,15 +161,15 @@ requirements: - intel-openmp # [blas_impl == "mkl" and (linux or win)] outputs: - # A meta-package to select CPU or GPU build for faiss. - - name: faiss-proc - version: 1.0.0 - build: - string: "{{ faiss_proc_type }}" - number: 0 - test: - commands: - - exit 0 + # # A meta-package to select CPU or GPU build for faiss. + # - name: faiss-proc + # version: 1.0.0 + # build: + # string: "{{ faiss_proc_type }}" + # number: 0 + # test: + # commands: + # - exit 0 # build two separate C++ libs, one generic, and one for AVX2 on x86_64 {% set CF_FAISS_BUILD_OPTS = ["generic"] %} @@ -287,8 +287,8 @@ outputs: - openblas-devel {{ openblas }} # [blas_impl == "openblas"] - libgomp # [blas_impl == "openblas" and linux] - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - # MKL is used on win and linux x86_64; macOS uses OpenBLAS to avoid - # mixing llvm-openmp with intel-openmp. + # MKL is used on win x86_64. Unix builds use OpenBLAS so FAISS's + # compiler OpenMP linkage stays in the GNU/LLVM runtime family. - mkl-devel {{ mkl }} # [blas_impl == "mkl"] # CUDA dependencies for GPU builds (needed for SWIG wrapper compilation) - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] @@ -351,30 +351,30 @@ outputs: # - pytest faiss/gpu/test/ # for compatibility with (& ease of migration from) existing packages in the pytorch channel - - name: faiss-cpu - build: - skip: true # [cuda_compiler_version != "None"] - # some MKL issue for py 3.8 on osx-64 - skip: true # [py==38 and osx and x86_64] - requirements: - run: - - faiss ={{ version }}=*_cpu - test: - imports: - - faiss + # - name: faiss-cpu + # build: + # skip: true # [cuda_compiler_version != "None"] + # # some MKL issue for py 3.8 on osx-64 + # skip: true # [py==38 and osx and x86_64] + # requirements: + # run: + # - faiss ={{ version }}=*_cpu + # test: + # imports: + # - faiss - - name: faiss-gpu - build: - skip: true # [cuda_compiler_version == "None"] - # some MKL issue for py 3.8 on osx-64 - skip: true # [py==38 and osx and x86_64] - requirements: - run: - - __cuda - - faiss ={{ version }}=*_cuda - test: - imports: - - faiss + # - name: faiss-gpu + # build: + # skip: true # [cuda_compiler_version == "None"] + # # some MKL issue for py 3.8 on osx-64 + # skip: true # [py==38 and osx and x86_64] + # requirements: + # run: + # - __cuda + # - faiss ={{ version }}=*_cuda + # test: + # imports: + # - faiss about: home: https://github.com/facebookresearch/faiss From d7e7d5ae8d5216e0eae6a89870bd113ce164f7d9 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Thu, 7 May 2026 09:09:14 -0600 Subject: [PATCH 06/11] Update meta.yaml --- recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f81ba569..d7fb2fc6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -287,9 +287,9 @@ outputs: - openblas-devel {{ openblas }} # [blas_impl == "openblas"] - libgomp # [blas_impl == "openblas" and linux] - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - # MKL is used on win x86_64. Unix builds use OpenBLAS so FAISS's - # compiler OpenMP linkage stays in the GNU/LLVM runtime family. + # MKL builds link the SWIG extensions against libiomp5 directly. - mkl-devel {{ mkl }} # [blas_impl == "mkl"] + - intel-openmp # [blas_impl == "mkl" and (linux or win)] # CUDA dependencies for GPU builds (needed for SWIG wrapper compilation) - cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"] - cuda-cudart-dev # [cuda_compiler_version != "None"] @@ -307,6 +307,7 @@ outputs: - libgomp # [blas_impl == "openblas" and linux] - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] - mkl # [blas_impl == "mkl"] + - {{ pin_compatible('intel-openmp') }} # [blas_impl == "mkl" and (linux or win)] - llvm-openmp # [blas_impl == "openblas" and osx] run_constrained: - faiss-cpu ==9999999999 # [cuda_compiler_version != "None"] From 02ef7701b425fd8f057ee41a10c9a2f88aaa7032 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Thu, 7 May 2026 11:31:31 -0600 Subject: [PATCH 07/11] A few fixes. --- recipe/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d7fb2fc6..11f29b59 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -137,15 +137,13 @@ build: number: {{ build_number }} # [cuda_compiler_version == "None"] # Python 3.13 builds currently fail on macOS (upstream SWIG bindings not ready). # Upstream issue: https://github.com/facebookresearch/faiss/issues/3985 - skip: true # [osx and py>=3.13] + skip: true # [osx and py>=313] requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - {{ compiler('cuda') }} # [cuda_compiler_version != "None"] - - patch # [not win] - - m2-patch # [win] - cmake - ninja-base - llvm-openmp {{ cxx_compiler_version }} # [blas_impl == "openblas" and osx] @@ -300,7 +298,7 @@ outputs: - python - libfaiss ={{ version }}=*_{{ faiss_proc_type }} - libfaiss-avx2 ={{ version }}=*_{{ faiss_proc_type }} # [x86_64] - - numpy + - numpy >=2.0 - packaging # bounds through run_exports - libopenblas # [blas_impl == "openblas"] @@ -341,6 +339,8 @@ outputs: {% set skips = skips + " or test_merge_IVFFastScan" %} # [win] # test_hnsw has non-deterministic results on Windows (still flaky in v1.14.1) {% set skips = skips + " or (TestHNSW and test_hnsw)" %} # [win] + # Exhaustive range search query iterator test is flaky on Windows + {% set skips = skips + " or test_query_iterator" %} # [win] # the linux & windows CI agents support AVX2 (OSX doesn't yet), so by default, # we expect faiss will load the library with AVX2-support, see # https://github.com/facebookresearch/faiss/blob/v1.7.1/faiss/python/loader.py#L52-L66 From 00d2a92320265656f9e5259ad98bf6bf83d32f4e Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Thu, 7 May 2026 14:06:15 -0600 Subject: [PATCH 08/11] Force numpy 2? --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 11f29b59..d29f5367 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -281,7 +281,7 @@ outputs: - packaging - setuptools - pip - - numpy {{ numpy }} + - numpy >=2.0 - openblas-devel {{ openblas }} # [blas_impl == "openblas"] - libgomp # [blas_impl == "openblas" and linux] - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] From 08cbb9144b4365dc8bfeaa43fae05d969a338044 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Thu, 7 May 2026 19:47:35 -0600 Subject: [PATCH 09/11] Additional skips --- recipe/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d29f5367..91c32904 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -331,12 +331,16 @@ outputs: {% set skips = skips + " or (test_residual_quantizer and test_index_accuracy)" %} # [aarch64 or ppc64le] # test_ivf_train_2level fails randomly on linux-64. Upstream recently increased the threshold. Tried that, but still failing occasionally. {% set skips = skips + " or test_ivf_train_2level" %} # [linux and x86_64] + # Fast scan IVF add test has precision issues on macOS + {% set skips = skips + " or (TestAdd and test_add)" %} # [osx] # Speed tests on aarch64 and arm64 ocassionally take a bit longer than threshold {% set skips = skips + " or test_PQ4_speed" %} # [aarch64 or arm64] # Panorama tests have floating point precision issues on Windows (v1.14.1 new feature) {% set skips = skips + " or test_flat_panorama or test_refine_panorama" %} # [win] # IVFFastScan merge test has non-deterministic results on Windows {% set skips = skips + " or test_merge_IVFFastScan" %} # [win] + # IndexFastScan merge test has non-deterministic results on Windows + {% set skips = skips + " or (TestMerge2 and test_merge_IndexFastScan_even_M)" %} # [win] # test_hnsw has non-deterministic results on Windows (still flaky in v1.14.1) {% set skips = skips + " or (TestHNSW and test_hnsw)" %} # [win] # Exhaustive range search query iterator test is flaky on Windows From dde114e8d88b1a9ce0b68f7d8d253903fab399e5 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Fri, 8 May 2026 08:34:10 -0600 Subject: [PATCH 10/11] Graph passing. Test numpy pinning again. --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 91c32904..f5207cfe 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -281,7 +281,7 @@ outputs: - packaging - setuptools - pip - - numpy >=2.0 + - numpy {{ numpy }} - openblas-devel {{ openblas }} # [blas_impl == "openblas"] - libgomp # [blas_impl == "openblas" and linux] - vcomp14 # [blas_impl == "openblas" and (win and x86_64)] From f892a5b924bc6766af57641c7a7a213f53820022 Mon Sep 17 00:00:00 2001 From: Eric Lundby Date: Fri, 8 May 2026 08:55:15 -0600 Subject: [PATCH 11/11] Add numpy to global output. --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f5207cfe..bf00d05a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -157,6 +157,7 @@ requirements: - mkl-devel {{ mkl }} # [blas_impl == "mkl"] - mkl {{ mkl }} # [blas_impl == "mkl"] - intel-openmp # [blas_impl == "mkl" and (linux or win)] + - numpy {{ numpy }} outputs: # # A meta-package to select CPU or GPU build for faiss.