Skip to content

fix: decouple coarse quantizer from cuvs index reset#4885

Open
hpdic wants to merge 6 commits intofacebookresearch:mainfrom
hpdic:feature_fix_cuvs_reset
Open

fix: decouple coarse quantizer from cuvs index reset#4885
hpdic wants to merge 6 commits intofacebookresearch:mainfrom
hpdic:feature_fix_cuvs_reset

Conversation

@hpdic
Copy link

@hpdic hpdic commented Mar 7, 2026

  • Summary. This pull request decouples the coarse quantizer from the cuVS index reset logic. It resolves a todo found in the GpuIndexIVFFlat.cu file.
  • Problem. In the previous implementation, calling reset on a cuVS enabled index would destroy the entire cuvs index object. This action unintentionally wiped out the trained centroids. To compensate for this, a temporary fix was in place within the train function to re-upload centroids if the index was already marked as trained.
  • Solution. The reset implementation in CuvsIVFFlat.cu has been updated to use the dedicated reset index helper from the cuVS library. This API clears only the inverted lists and leaves the trained centroids untouched. Consequently, the redundant logic and the TODO comment in GpuIndexIVFFlat.cu have been removed.
  • Testing. The changes were validated using the standard test suite.
    • Environment: A100 GPU with CUDA 12.6 and cuVS.
    • Result: 302 tests passed, 0 failed.

@meta-cla
Copy link

meta-cla bot commented Mar 7, 2026

Hi @hpdic!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed label Mar 7, 2026
@meta-cla
Copy link

meta-cla bot commented Mar 7, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-codesync
Copy link
Contributor

meta-codesync bot commented Mar 11, 2026

@limqiying has imported this pull request. If you are a Meta employee, you can view this in D96046499.

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.

2 participants