Skip to content

MB-71833: Add num_threads omp pragma to IVFRaBitQ#78

Merged
deepkaran merged 1 commit into
blevesearch:blevefrom
ksaikrishnateja:rabitqPatch
May 15, 2026
Merged

MB-71833: Add num_threads omp pragma to IVFRaBitQ#78
deepkaran merged 1 commit into
blevesearch:blevefrom
ksaikrishnateja:rabitqPatch

Conversation

@ksaikrishnateja
Copy link
Copy Markdown

This change brings IndexIVFRaBitQ in line with the rest of the Faiss codebase by adding num_threads(num_omp_threads) to all OpenMP parallel regions in the class. Previously, the OMP pragmas in encode_vectors, decode_vectors, add_core, and sa_decode did not respect the global num_omp_threads setting (configured via set_num_omp_threads()), causing those operations to always use OpenMP's default thread count regardless of any user-configured limit.

Changes:
• Added #include <faiss/OMPConfig.h> to expose num_omp_threads
• Applied num_threads(num_omp_threads) to four #pragma omp parallel regions in IndexIVFRaBitQ.cpp

@deepkaran deepkaran merged commit 3ea23cd into blevesearch:bleve May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants