faiss/demos/rocksdb_ivf
Gergely Szilvasy 51b6083187 faiss on rocksdb demo (#3216)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3216

Reviewed By: mdouze

Differential Revision: D53051090

Pulled By: algoriddle

fbshipit-source-id: 13a027db36207af9be11a2f181116994b2aff2cb
2024-01-25 07:39:53 -08:00
..
CMakeLists.txt faiss on rocksdb demo (#3216) 2024-01-25 07:39:53 -08:00
README.md faiss on rocksdb demo (#3216) 2024-01-25 07:39:53 -08:00
RocksDBInvertedLists.cpp faiss on rocksdb demo (#3216) 2024-01-25 07:39:53 -08:00
RocksDBInvertedLists.h faiss on rocksdb demo (#3216) 2024-01-25 07:39:53 -08:00
demo_rocksdb_ivf.cpp faiss on rocksdb demo (#3216) 2024-01-25 07:39:53 -08:00

README.md

Storing Faiss inverted lists in RocksDB

Demo of storing the inverted lists of any IVF index in RocksDB or any similar key-value store which supports the prefix scan operation.

How to build

We use conda to create the build environment for simplicity. Only tested on Linux x86.

conda create -n rocksdb_ivf
conda activate rocksdb_ivf
conda install pytorch::faiss-cpu conda-forge::rocksdb cmake make gxx_linux-64 sysroot_linux-64
cd ~/faiss/demos/rocksdb_ivf
cmake -B build .
make -C build -j$(nproc)

Run the example

cd ~/faiss/demos/rocksdb_ivf/build
./rocksdb_ivf test_db