From 88b7255830d7c087847b9b839ad94affa4d8f104 Mon Sep 17 00:00:00 2001 From: qmc20234 <129745252+qmc20234@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:21:33 -0700 Subject: [PATCH] fix argument error (#2965) Summary: the argument in IndexIVFPQ constructor should be pq.M, not code_size Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2965 Reviewed By: algoriddle Differential Revision: D48024513 Pulled By: mdouze fbshipit-source-id: d5cb92a32bbcb647ee12a4bc6b026059c20740db --- faiss/gpu/GpuCloner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faiss/gpu/GpuCloner.cpp b/faiss/gpu/GpuCloner.cpp index 94b587b2ed..483cc562b8 100644 --- a/faiss/gpu/GpuCloner.cpp +++ b/faiss/gpu/GpuCloner.cpp @@ -333,7 +333,7 @@ Index* ToGpuClonerMultiple::clone_Index_to_shards(const Index* index) { const_cast(quantizer), index_ivfpq->d, index_ivfpq->nlist, - index_ivfpq->code_size, + index_ivfpq->pq.M, index_ivfpq->pq.nbits); idx2.metric_type = index_ivfpq->metric_type; idx2.pq = index_ivfpq->pq;