Open Gold-Sea opened 2 years ago
So I assume the versions are 1.5.2 and the current version.
So I assume the versions are 1.5.2 and the current version.
Yes , I clone the two versions of code via: git clone -b v1.15.2 https://github.com/facebookresearch/faiss.git and git clone -b main https://github.com/facebookresearch/faiss.git
trying to repro...
Tried the following script: bench_deep10M.py on an Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz with Ubuntu 20.04.2 LTS Results (with 2M vectors of deep1B, otherwise it's too slow): 1.5.2 --> 15 s 1.7.2 --> 5.4 s (details here: https://gist.github.com/mdouze/40f088dc6c1b49b118049444f58746be) So it is quite the opposite from your observation (the current version is much faster).
Tried the following script: bench_deep10M.py on an Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz with Ubuntu 20.04.2 LTS Results (with 2M vectors of deep1B, otherwise it's too slow): 1.5.2 --> 15 s 1.7.2 --> 5.4 s (details here: https://gist.github.com/mdouze/40f088dc6c1b49b118049444f58746be) So it is quite the opposite from your observation (the current version is much faster).
Thanks for replying! Do you use muti-threads?
Tried the following script: bench_deep10M.py on an Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz with Ubuntu 20.04.2 LTS Results (with 2M vectors of deep1B, otherwise it's too slow): 1.5.2 --> 15 s 1.7.2 --> 5.4 s (details here: https://gist.github.com/mdouze/40f088dc6c1b49b118049444f58746be) So it is quite the opposite from your observation (the current version is much faster).
I have reproduced your result without (faiss.omp_set_num_threads(1)). However, after setting only one thread, my result emerges again.
In 1.5.2, there is no performance difference between faiss.omp_set_num_threads(1) and faiss.omp_set_num_threads(16)
当我使用HNSW时,遇到了同样的问题,你知道是什么原因吗?
Summary
I use different versions of faiss and run one of the demo program(only change the datasets to deep10M). I record every query's latency through index IVF1024,Flat and nprobe=64. However, in 1.15.2 the average latency is 20ms/query and 60ms/query in 1.17.2.
Platform
I use docker image intel/oneapi-basekit
OS: AWS c5.4xlarge, ubuntu 18.04
Faiss version: For 1.15.2 the commit id is dacd5a9f51fe7933685bf906009b398ceeb504ab, 878275f915dee96f13b07d6a309fdfd6fd7fc614 for 1.17.2.
Installed from: source code
Faiss compilation options: 1.15.2: ./configure --without-cuda 1.17.2: cmake -B build . -DBLA_VENDOR=Intel10_64_dyn -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DFAISS_OPT_LEVEL=avx2 -DCMAKE_BUILD_TYPE=Release
Running on:
Interface:
Reproduction instructions
Here is the demo code: https://github.com/Gold-Sea/Poems/blob/main/demo_sift1M.cpp