Skip to content

Commit 0cbc2a8

Browse files
mulugetamfacebook-github-bot
authored andcommitted
Use _mm512_popcnt_epi64 to speedup hamming distance evaluation. (facebookresearch#4020)
Summary: The `_mm512_popcnt_epi64` intrinsic is used to accelerate Hamming distance calculations in `HammingComputerDefault` and `HammingComputer64`. Benchmarking with [bench_hamming_computer](https://github.com/facebookresearch/faiss/blob/main/benchs/bench_hamming_computer.cpp) on AWS [r7i](https://aws.amazon.com/ec2/instance-types/r7i/) instance shows a performance improvement of up to 30% compared to AVX-2. This PR depends on [PR#4025](facebookresearch#4025) Pull Request resolved: facebookresearch#4020 Reviewed By: junjieqi Differential Revision: D67650183 Pulled By: mengdilin fbshipit-source-id: 17e5b68570dced1fea0b885dd4e67c17dfc7bece
1 parent ab479a1 commit 0cbc2a8

File tree

3 files changed

+494
-0
lines changed

3 files changed

+494
-0
lines changed

faiss/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ set(FAISS_HEADERS
230230
utils/hamming_distance/hamdis-inl.h
231231
utils/hamming_distance/neon-inl.h
232232
utils/hamming_distance/avx2-inl.h
233+
utils/hamming_distance/avx512-inl.h
233234
)
234235

235236
if(NOT WIN32)

0 commit comments

Comments
 (0)