mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
Include IndexResidual in clone_index
Summary: Moving index from cpu to gpu is failing with error message `RuntimeError: Error in virtual faiss::Index *faiss::Cloner::clone_Index(const faiss::Index *) at faiss/clone_index.cpp:144: clone not supported for this type of Index` This diff support IndexResidual clone and unblocks gpu training Reviewed By: sc268, mdouze Differential Revision: D28614996 fbshipit-source-id: 9b1e5e7c5dd5da6d55f02594b062691565a86f49
This commit is contained in:
parent
d5a1bf3e9b
commit
0825eaf8d3
@ -27,6 +27,7 @@
|
||||
#include <faiss/IndexNSG.h>
|
||||
#include <faiss/IndexPQ.h>
|
||||
#include <faiss/IndexPreTransform.h>
|
||||
#include <faiss/IndexResidual.h>
|
||||
#include <faiss/IndexScalarQuantizer.h>
|
||||
#include <faiss/MetaIndexes.h>
|
||||
#include <faiss/VectorTransform.h>
|
||||
@ -79,6 +80,7 @@ Index* Cloner::clone_Index(const Index* index) {
|
||||
TRYCLONE(IndexFlatIP, index)
|
||||
TRYCLONE(IndexFlat, index)
|
||||
TRYCLONE(IndexLattice, index)
|
||||
TRYCLONE(IndexResidual, index)
|
||||
TRYCLONE(IndexScalarQuantizer, index)
|
||||
TRYCLONE(MultiIndexQuantizer, index)
|
||||
if (const IndexIVF* ivf = dynamic_cast<const IndexIVF*>(index)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user