Skip to main content

A library for efficient similarity search and clustering of dense vectors.

Project description

faiss-wheels

Build PyPI

faiss python wheel packages.

Overview

This repository provides scripts to build wheel packages for the faiss library.

  • Builds CPU-only version with cibuildwheel.
  • Bundles OpenBLAS in Linux/Windows
  • Uses Accelerate framework in macOS

There is also a source package to customize the build process.

Note GPU package has been supported until version 1.7.2, but is not available since version 1.7.3 due to the PyPI limitation.

Install

Install a binary package by:

pip install faiss-cpu

Building source package

If there is a custom built faiss library in the system, build source package for the best performance.

Prerequisite

The source package assumes faiss is already built and installed in the system. Build and install the faiss library first.

cd faiss
cmake . -B build -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DFAISS_OPT_LEVEL=avx512
cmake --build build --config Release -j
cmake --install build install
cd ..

See the official faiss installation instruction for more on how to build and install faiss.

For building sdist, swig 3.0.12 or later needs to be available.

Building a source distribution

The following builds and installs the faiss-cpu source package with AVX512.

export FAISS_OPT_LEVEL=avx512
pip install --no-binary :all: faiss-cpu

The following example builds a GPU wheel.

export FAISS_ENABLE_GPU=ON
pip install --no-binary :all: faiss-cpu

There are a few environment variables that specifies build-time options.

  • FAISS_INSTALL_PREFIX: Specifies the install location of faiss library, default to /usr/local.
  • FAISS_OPT_LEVEL: Faiss SIMD optimization, one of generic, avx2, avx512. Note that AVX option is only available in x86_64 arch.
  • FAISS_ENABLE_GPU: Setting this variable to ON builds GPU wrappers. Set this variable if faiss is built with GPU support.
  • CUDA_HOME: Specifies CUDA install location for building GPU wrappers, default to /usr/local/cuda.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faiss-cpu-1.8.0.tar.gz (63.6 kB view hashes)

Uploaded Source

Built Distributions

faiss_cpu-1.8.0-cp312-cp312-win_amd64.whl (14.5 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

faiss_cpu-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.0 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.8.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.8.0-cp312-cp312-macosx_11_0_arm64.whl (3.1 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

faiss_cpu-1.8.0-cp312-cp312-macosx_10_14_x86_64.whl (7.4 MB view hashes)

Uploaded CPython 3.12 macOS 10.14+ x86-64

faiss_cpu-1.8.0-cp311-cp311-win_amd64.whl (14.5 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

faiss_cpu-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.8.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.8.0-cp311-cp311-macosx_11_0_arm64.whl (3.1 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

faiss_cpu-1.8.0-cp311-cp311-macosx_10_14_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.11 macOS 10.14+ x86-64

faiss_cpu-1.8.0-cp310-cp310-win_amd64.whl (14.5 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

faiss_cpu-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.8.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.8.0-cp310-cp310-macosx_11_0_arm64.whl (3.1 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

faiss_cpu-1.8.0-cp310-cp310-macosx_10_14_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.10 macOS 10.14+ x86-64

faiss_cpu-1.8.0-cp39-cp39-win_amd64.whl (14.5 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

faiss_cpu-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.8.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.8.0-cp39-cp39-macosx_11_0_arm64.whl (3.1 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

faiss_cpu-1.8.0-cp39-cp39-macosx_10_14_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

faiss_cpu-1.8.0-cp38-cp38-win_amd64.whl (14.5 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

faiss_cpu-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

faiss_cpu-1.8.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

faiss_cpu-1.8.0-cp38-cp38-macosx_11_0_arm64.whl (3.1 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

faiss_cpu-1.8.0-cp38-cp38-macosx_10_14_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page