Skip to content

Add pip install support via scikit-build-core + cibuildwheel (#4862)#4862

Closed
alibeklfc wants to merge 1 commit into
facebookresearch:mainfrom
alibeklfc:export-D95258115
Closed

Add pip install support via scikit-build-core + cibuildwheel (#4862)#4862
alibeklfc wants to merge 1 commit into
facebookresearch:mainfrom
alibeklfc:export-D95258115

Conversation

@alibeklfc
Copy link
Copy Markdown
Contributor

@alibeklfc alibeklfc commented Mar 4, 2026

Summary:

Add official pip wheel packaging for faiss-cpu, enabling
pip install faiss-cpu from PyPI. Builds binary wheels across Linux
x86_64/aarch64, macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.14.
Linux and macOS use Python Stable ABI (abi3) — a single cp310-abi3 wheel
per platform works on all Python 3.10+ versions without per-version rebuilds.

BLAS strategy:

  • Linux (x86_64 and aarch64): Threaded OpenBLAS (libopenblaso). The
    CMake build prefers libopenblaso (OpenMP-threaded) or libopenblasp
    (pthreads-threaded) over the serial default on RHEL/Fedora-based
    manylinux containers.
  • macOS: Apple Accelerate (found automatically).
  • Windows: Prebuilt OpenBLAS from GitHub releases (v0.3.30).

SIMD optimization strategy:

  • Linux and macOS: Dynamic Dispatch (FAISS_OPT_LEVEL=dd) compiles SIMD-hot
    kernel files at multiple ISA levels (generic + AVX2 + AVX-512 on x86_64,
    NEON + SVE on aarch64) into a single library. Runtime CPUID detection
    selects the optimal code path automatically.
  • Windows: MSVC does not support DD, so uses FAISS_OPT_LEVEL=generic.
    Shared libraries (BUILD_SHARED_LIBS=ON) are used to avoid MSVC's
    single-pass static archive scanning issue.

New files:

  • pyproject.toml: scikit-build-core build backend config with cibuildwheel
    settings. Version is dynamically extracted from CMakeLists.txt. Enables
    abi3 on Linux/macOS via SWIG 4.2+ and NumPy 2.0+ Limited API support.
    Enables LTO and dead-code stripping for smaller wheel sizes.
  • .github/workflows/build-pip.yml: CI workflow using cibuildwheel to build
    binary wheels on 5 platform runners. All GitHub Actions are pinned to
    commit SHAs for supply chain security. Publishes wheels to PyPI via OIDC
    trusted publishers on tag push.
  • THIRD_PARTY_NOTICES: License notices for bundled dependencies (OpenBLAS,
    LLVM OpenMP).
  • tests/test_wheel_smoke.py: 12-test smoke suite validating import,
    OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
    roundtrip, GC safety, contrib imports, and SIMD level detection.

Modified files:

  • faiss/CMakeLists.txt: Added threaded OpenBLAS fallback — prefers
    libopenblaso (OpenMP-threaded) or libopenblasp (pthreads-threaded)
    over the serial default on RHEL/Fedora-based manylinux containers.
  • python/CMakeLists.txt: Added install() targets for scikit-build-core
    wheel packaging, including all Dynamic Dispatch SWIG variants
    (avx2/avx512/avx512_spr/sve). Added abi3 support: conditionally uses
    Python::SABIModule, defines Py_LIMITED_API, and sets .abi3.so suffix
    when SKBUILD_SABI_VERSION is set.
  • .github/workflows/build.yml: Wired build-pip.yml into the root CI
    trigger so pip builds run alongside conda builds.
  • tests/BUCK: Added python_pytest target for the smoke test.

Reviewed By: mnorris11

Differential Revision: D95258115

@meta-cla meta-cla Bot added the CLA Signed label Mar 4, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Mar 4, 2026

@alibeklfc has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95258115.

alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 4, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 4, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 4, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 4, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 4, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 4, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
@alibeklfc alibeklfc force-pushed the export-D95258115 branch 2 times, most recently from e378593 to 242a16e Compare March 5, 2026 19:37
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 5, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 6, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
@alibeklfc alibeklfc force-pushed the export-D95258115 branch 2 times, most recently from 1657e14 to 6d58298 Compare March 6, 2026 05:26
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 6, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 6, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 6, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
@alibeklfc alibeklfc force-pushed the export-D95258115 branch 2 times, most recently from 1b8df4a to f0d431f Compare March 6, 2026 20:21
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 6, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 6, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
@alibeklfc alibeklfc force-pushed the export-D95258115 branch 2 times, most recently from 8b7e98f to 874592b Compare March 9, 2026 15:16
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 9, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
alibeklfc added a commit to alibeklfc/faiss that referenced this pull request Mar 9, 2026
…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds wheels across Linux x86_64/aarch64,
macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.13.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Uses Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) for runtime SIMD
  selection, OpenBLAS for BLAS, and disables GPU/MKL/SVS.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  wheels on 5 platform runners. Publishes to PyPI via OIDC trusted publishers
  on tag push.
- `tests/test_wheel_smoke.py`: 11-check smoke test suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `python/CMakeLists.txt`: Added `install()` targets so scikit-build-core can
  package the SWIG extension module, Python source files, and contrib
  subpackage into wheels.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.

Differential Revision: D95258115
Comment thread .github/workflows/build-pip-gpu.yml Outdated
strategy:
fail-fast: false
matrix:
python: ["cp310", "cp311", "cp312", "cp313"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No cp314 support yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added cp314 support. Enabled abi3 on Linux/macOS, for Windows build wheel for each python version

Comment thread .github/workflows/build-pip-gpu.yml Outdated
python-version: '3.12'

- name: Install cibuildwheel
run: pip install cibuildwheel==2.22.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest cibuildwheel is v3.4.0. Any reason to pin the version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated cibuildwheel version

Comment thread .github/workflows/build-pip.yml Outdated
- name: Build sdist
run: pipx run build --sdist

- name: Upload sdist
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, sdist format for a large project like Faiss would only introduce user confusion with a lot of build error reports appearing on GitHub issues. If GPU wheels are planned to be officially supported, I believe we should exclude sdist from PyPI upload.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed sdist

Comment thread faiss/python/__init__.py Outdated
import inspect


def _preload_gpu_libs():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment. Actually, Intel MKL or BLAS libraries can be treated the same way, as long as the build-time configuration is properly set up. That would be a future enhancement to reduce the package size.

Comment thread pyproject-gpu-cuvs.toml Outdated

[build-system]
# cuVS requires rapids-cmake which needs cmake >= 3.30.4.
requires = ["scikit-build-core>=0.10", "numpy>=2.0", "cmake>=3.30.4"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment. It is possible to include swig from PyPI as a build-time dependency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included swig as a build-time dependency.

Comment thread pyproject-gpu.toml Outdated
dependencies = [
"numpy>=1.25",
"packaging",
"nvidia-cuda-runtime-cu12",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an expert on this, but do we need to worry about CUDA minor version compatibility? It is fine if a CUDA 12.6 wheel runs on a CUDA 12.4 runtime. https://docs.nvidia.com/deploy/cuda-compatibility/minor-version-compatibility.html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be addressed in next PR, this PR is not only for faiss-cpu

Comment thread pyproject.toml Outdated
# location (C:\mkl) so FindMKL.cmake can discover it regardless of
# PEP 517 build isolation. DLL collection includes MKL, Intel OpenMP
# (libiomp5md.dll), and TBB — all needed at runtime.
before-all = "pip install virtualenv && choco install -y swig && pip install mkl==2024.2.2 mkl-devel==2024.2.2 && python -c \"import os,sys,shutil; os.makedirs('C:/mkl/lib',exist_ok=True); os.makedirs('C:/mkl/bin',exist_ok=True); os.makedirs('C:/mkl/include',exist_ok=True); [shutil.copy2(os.path.join(r,f),'C:/mkl/lib/') for r,_,fs in os.walk(sys.prefix) for f in fs if f.endswith('.lib') and 'mkl' in f]; [shutil.copy2(os.path.join(r,f),'C:/mkl/bin/') for r,_,fs in os.walk(sys.prefix) for f in fs if f.endswith('.dll') and ('mkl' in f or 'iomp' in f or 'tbb' in f)]; [shutil.copy2(os.path.join(r,f),'C:/mkl/include/') for r,_,fs in os.walk(sys.prefix) for f in fs if f=='mkl.h']; print('MKL lib:',os.listdir('C:/mkl/lib')); print('MKL bin:',os.listdir('C:/mkl/bin'))\""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would refactor this in a script file for better maintainability.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this part, since we will use BLAS for now

Comment thread .github/workflows/build-pip.yml Outdated
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-2022, 2-core-ubuntu-arm]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says macOS x86_64 is included, but the CI configuration drops the Intel support; macos-14 is arm64. Better to update the PR description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added macos-15-intel support

@alibeklfc
Copy link
Copy Markdown
Contributor Author

Hi, @kyamagu ! I have updated the PR. This PR is only for faiss-cpu support right now. I will work on faiss-gpu after that. I addressed all your comments. Made this PR cleaner and more efficient.
Can you please review this PR again?
Thank you!

Copy link
Copy Markdown
Contributor

@kyamagu kyamagu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks great! The only thing I found is the duplicated wheel content. After fixing this, I believe the pip support is ready.

I would initiate the transfer of the PyPI repository when you're ready. Let me know your or your designated PyPI account.

Comment thread pyproject.toml Outdated

# Exclude C++ headers, cmake configs, static libs, and binaries from the wheel.
# Only the Python package (faiss/) and bundled shared libs remain.
wheel.exclude = ["include/**", "share/**", "lib/**", "bin/**"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list misses lib64, and Linux wheels get duplicated libfaiss.so files.

tar tvf faiss_cpu-1.14.1-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | grep libfaiss
-rwxr-xr-x  0 0      0     9798425 Apr  6 21:41 faiss/libfaiss.so
-rwxr-xr-x  0 0      0     9798425 Apr  6 21:41 lib64/libfaiss.so

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed this issue. Thank you!

…kresearch#4862)

Summary:

Add official pip wheel packaging for `faiss-cpu`, enabling
`pip install faiss-cpu` from PyPI. Builds binary wheels across Linux
x86_64/aarch64, macOS arm64/x86_64, and Windows x86_64 for Python 3.10-3.14.
Linux and macOS use Python Stable ABI (abi3) — a single cp310-abi3 wheel
per platform works on all Python 3.10+ versions without per-version rebuilds.

**BLAS strategy:**
- Linux (x86_64 and aarch64): Threaded OpenBLAS (`libopenblaso`). The
  CMake build prefers `libopenblaso` (OpenMP-threaded) or `libopenblasp`
  (pthreads-threaded) over the serial default on RHEL/Fedora-based
  manylinux containers.
- macOS: Apple Accelerate (found automatically).
- Windows: Prebuilt OpenBLAS from GitHub releases (v0.3.30).

**SIMD optimization strategy:**
- Linux and macOS: Dynamic Dispatch (`FAISS_OPT_LEVEL=dd`) compiles SIMD-hot
  kernel files at multiple ISA levels (generic + AVX2 + AVX-512 on x86_64,
  NEON + SVE on aarch64) into a single library. Runtime CPUID detection
  selects the optimal code path automatically.
- Windows: MSVC does not support DD, so uses `FAISS_OPT_LEVEL=generic`.
  Shared libraries (`BUILD_SHARED_LIBS=ON`) are used to avoid MSVC's
  single-pass static archive scanning issue.

**New files:**
- `pyproject.toml`: scikit-build-core build backend config with cibuildwheel
  settings. Version is dynamically extracted from CMakeLists.txt. Enables
  abi3 on Linux/macOS via SWIG 4.2+ and NumPy 2.0+ Limited API support.
  Enables LTO and dead-code stripping for smaller wheel sizes.
- `.github/workflows/build-pip.yml`: CI workflow using cibuildwheel to build
  binary wheels on 5 platform runners. All GitHub Actions are pinned to
  commit SHAs for supply chain security. Publishes wheels to PyPI via OIDC
  trusted publishers on tag push.
- `THIRD_PARTY_NOTICES`: License notices for bundled dependencies (OpenBLAS,
  LLVM OpenMP).
- `tests/test_wheel_smoke.py`: 12-test smoke suite validating import,
  OpenMP, BLAS (FlatL2/FlatIP), index factory (IVF+PQ), HNSW, serialization
  roundtrip, GC safety, contrib imports, and SIMD level detection.

**Modified files:**
- `faiss/CMakeLists.txt`: Added threaded OpenBLAS fallback — prefers
  `libopenblaso` (OpenMP-threaded) or `libopenblasp` (pthreads-threaded)
  over the serial default on RHEL/Fedora-based manylinux containers.
- `python/CMakeLists.txt`: Added `install()` targets for scikit-build-core
  wheel packaging, including all Dynamic Dispatch SWIG variants
  (avx2/avx512/avx512_spr/sve). Added abi3 support: conditionally uses
  `Python::SABIModule`, defines `Py_LIMITED_API`, and sets `.abi3.so` suffix
  when `SKBUILD_SABI_VERSION` is set.
- `.github/workflows/build.yml`: Wired `build-pip.yml` into the root CI
  trigger so pip builds run alongside conda builds.
- `tests/BUCK`: Added `python_pytest` target for the smoke test.

Reviewed By: mnorris11

Differential Revision: D95258115
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 1, 2026

This pull request has been merged in 585ba79.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants