Skip to content

Commit

Permalink
Begin migrate ScalarQuantizer to simdlib (facebookresearch#3613)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookresearch#3613

As a demo for Mengdi.

The steps to fully migrate to simdlib are:

1. change all function interfaces to use the generic simd8float32 and friends prototypes -- make sure it compiles on fbcode.

2. make sure it also compiles on ARM

3. see which functions can be mirgrated to only use the generic codepath

4. benchmark if the simd emulated path is competitve with the scalar (for platforms without specific SIMD support)

The rationale here is that there are many SIMD instructions that are straightforward, like adding or subtracting registers, they can be put in common between implementations. The only code that may remain with arch-specific intrinsics is where they way of doing things is very different between AVX and NEON.

Differential Revision: D59395882
  • Loading branch information
mengdilin authored and facebook-github-bot committed Sep 25, 2024
1 parent c8d1474 commit ea866ea
Show file tree
Hide file tree
Showing 5 changed files with 1,131 additions and 1,284 deletions.
1 change: 1 addition & 0 deletions faiss/impl/AdditiveQuantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <faiss/utils/Heap.h>
#include <faiss/utils/distances.h>
#include <faiss/utils/hamming.h>
#include <faiss/utils/simdlib.h>
#include <faiss/utils/utils.h>

extern "C" {
Expand Down
Loading

0 comments on commit ea866ea

Please sign in to comment.