Skip to content

Reduce IVFRaBitQFastScan search allocations#5083

Open
lyang24 wants to merge 1 commit intofacebookresearch:mainfrom
lyang24:opt/rabitq-eliminate-search-allocs
Open

Reduce IVFRaBitQFastScan search allocations#5083
lyang24 wants to merge 1 commit intofacebookresearch:mainfrom
lyang24:opt/rabitq-eliminate-search-allocs

Conversation

@lyang24
Copy link
Copy Markdown
Contributor

@lyang24 lyang24 commented Apr 12, 2026

On the search-only profile, the old code was doing avoidable heap work in compute_LUT:

  • one large n * nprobe * d residual buffer allocation per search
  • repeated temporary vector allocations inside compute_residual_LUT
  • an extra copy of QueryFactorsData when storing per-query/per-probe factors

This patch removes those costs.

… buffers in compute_LUT while keeping multibit rotated_q storage owned until refinement.
@meta-cla meta-cla bot added the CLA Signed label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant