Open cjnolet opened 5 years ago
Two possible workarounds:
GpuIndexFlatL2
in an IDMap
successive_ids
option of IndexShards
, then add
will work (the comment in the code is incorrect). @cjnolet I think the case you're looking at here is to keep everything on the GPU and avoid unnecessary GPU/CPU synchronization?
I can look into adding support for labels for GpuIndexFlat.
Also, for the cuML use case, brute-force search functionality is now exposed as a function call, so you don't have to wrap data in an index (with the additional copy). I could add the ability to pass an optional index array pointer to this as well.
https://github.com/facebookresearch/faiss/blob/master/gpu/GpuDistance.h#L30
I find the
IndexShards
class to be very useful in the C++ API. It does seem to require, however, that the sub indices implementadd_with_ids()
. As a workaround, I am adding my data to my own vector ofGpuIndexFlatL2
instances and calling themerge_tables
reduction function myself.This small change would enable me to use
IndexShards