fix: decouple coarse quantizer from cuvs index reset#4885
fix: decouple coarse quantizer from cuvs index reset#4885hpdic wants to merge 6 commits intofacebookresearch:mainfrom
Conversation
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.
|
Hi @hpdic! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
@limqiying has imported this pull request. If you are a Meta employee, you can view this in D96046499. |