Add SIMD dynamic dispatch migration guide (#4973)#4973
Closed
algoriddle wants to merge 1 commit intofacebookresearch:mainfrom
Closed
Add SIMD dynamic dispatch migration guide (#4973)#4973algoriddle wants to merge 1 commit intofacebookresearch:mainfrom
algoriddle wants to merge 1 commit intofacebookresearch:mainfrom
Conversation
Contributor
|
@algoriddle has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97799584. |
This was referenced Mar 23, 2026
1393485 to
6ad2a6b
Compare
algoriddle
pushed a commit
to algoriddle/faiss
that referenced
this pull request
Mar 26, 2026
Summary: Add a developer-facing guide for migrating FAISS modules from compile-time #ifdef SIMD guards to the runtime dynamic dispatch (DD) infrastructure. Covers: - Why separate compilation units are required (auto-vectorization trap) - The 4-step conversion recipe with worked examples - Two template instantiation patterns (explicit vs macro-driven) - Dispatch masks and with_selected_simd_levels - Build system setup (CMake + Buck) - Common patterns: shared -inl.h kernels, auto-vectorization, SVE forwarding - Key design principles - Testing workflow with FAISS_OPT_LEVEL=dd and FAISS_SIMD_LEVEL override - Common pitfalls All code examples link to specific lines in the GitHub repo (pinned to commit 645a742) so readers can verify patterns against real code. Differential Revision: D97799584
Summary: Pull Request resolved: facebookresearch#4973 Add a developer-facing guide for migrating FAISS modules from compile-time #ifdef SIMD guards to the runtime dynamic dispatch (DD) infrastructure. Covers: - Why separate compilation units are required (auto-vectorization trap) - The 4-step conversion recipe with worked examples - Two template instantiation patterns (explicit vs macro-driven) - Dispatch masks and with_selected_simd_levels - Build system setup (CMake + Buck) - Common patterns: shared -inl.h kernels, auto-vectorization, SVE forwarding - Key design principles - Testing workflow with FAISS_OPT_LEVEL=dd and FAISS_SIMD_LEVEL override - Common pitfalls All code examples link to specific lines in the GitHub repo (pinned to commit 645a742) so readers can verify patterns against real code. Differential Revision: D97799584
6ad2a6b to
ecf0cde
Compare
Contributor
|
This pull request has been merged in e6f5c0c. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add a developer-facing guide for migrating FAISS modules from compile-time
#ifdef SIMD guards to the runtime dynamic dispatch (DD) infrastructure.
Covers:
All code examples link to specific lines in the GitHub repo (pinned to
commit 645a742) so readers can verify patterns against real code.
Differential Revision: D97799584