facebookresearch / facebookresearch/faiss

GpuIndexFlatL2 should support add_with_ids()

Open
#703 2 comments 0 reactions 0 assignees View on GitHub
enhancement GPU
Dominant language
C++
Stars
40.9k
Forks
4.5k
PR merge metrics
No merged PRs in 30d

Description

I find the `IndexShards` class to be very useful in the C++ API. It does seem to require, however, that the sub indices implement `add_with_ids()`. As a workaround, I am adding my data to my own vector of `GpuIndexFlatL2` instances and calling the `merge_tables` reduction function myself.

This small change would enable me to use `IndexShards`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the C++ API path from IndexShards to its sub-index add_with_ids() calls, then inspect GpuIndexFlatL2 and the existing merge_tables workaround described in the issue. Done means GpuIndexFlatL2 can be used as an IndexShards sub-index with add_with_ids() without requiring manual reduction; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.