• Stars
    star
    286
  • Rank 144,690 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unofficial faiss wheel builder

faiss-wheels

Build PyPI 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=avx2
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 wheel package

By default, the following builds and installs the faiss-cpu package.

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.

  • CUDA_HOME: Specifies CUDA install location for building faiss-gpu package.
  • FAISS_OPT_LEVEL: Faiss SIMD optimization, one of generic, avx2. When set to avx2, the package internally builds avx2 extension in addition to generic. Note this option is only available in x86_64 arch.
  • FAISS_ENABLE_GPU: Setting this variable to ON builds faiss-gpu package. Set this variable if faiss is built with GPU support.

More Repositories

1

mexopencv

Collection and a development kit of matlab mex functions for OpenCV library
MATLAB
660
star
2

js-segment-annotator

Javascript image annotation tool based on image segmentation.
JavaScript
524
star
3

skia-python

Python binding to Skia Graphics Library
Jupyter Notebook
240
star
4

bbox-annotator

A bounding box annotation widget written in CoffeeScript.
HTML
162
star
5

mexplus

C++ Matlab MEX development kit.
C++
99
star
6

paperdoll

Paper doll parser implementation from ICCV 2013
Jupyter Notebook
83
star
7

matlab-json

Use official API: https://mathworks.com/help/matlab/json-format.html
Java
52
star
8

psd2svg

PSD to SVG converter.
Python
52
star
9

matlab-lmdb

Matlab LMDB wrapper
C
38
star
10

js-graph-annotator

Javascript widget to draw a graph annotation on an image.
JavaScript
37
star
11

matlab-sqlite3-driver

Matlab driver for SQLite3 database
C
35
star
12

sge-gpuprolog

Scripts to manage NVIDIA GPU devices in SGE 6.2u5
Shell
25
star
13

photoshop-connection

Python package to remotely execute ExtendScript in Adobe Photoshop.
Python
22
star
14

pf-segmentation

Image segmentation algorithm of [P Felzenszwalb 2004] for Matlab
C++
16
star
15

matlab-leveldb

Matlab LevelDB wrapper
C++
11
star
16

matlab-tcpip

TCP/IP server and client for Matlab
MATLAB
11
star
17

matlab-fscache

File-system based cache for Matlab.
MATLAB
4
star
18

matlab-bson

Matlab BSON encoder based on libbson.
C
4
star
19

lda-matlab

Latent Dirichlet Allocation for Matlab
C++
4
star
20

matlab-bdb

Persistent key-value storage for matlab.
C++
3
star
21

matlab-batch

Distributed Matlab job execution library.
MATLAB
3
star
22

matlab-serialization

Matlab object serialization functions
C++
2
star
23

matlab-ejdb

EJDB Matlab binding
C++
1
star