I would like to either enable moving the parameters, defined with ParameterSpace for a cpu index, to the GPU if the index is moved to the GPU or have a warning that flags that I need to reset the parameters once I move my index to GPU.
Platform
OS: Ubuntu 20.04.6
Faiss version:1.7.4
Installed from: conda
Running on:
GPU
Interface:
Python
Reproduction instructions
An example is provided where I set the verbose mode to true using ParameterSpace() but I can't see the expected logs once I move my index to the gpu.
import faiss
import numpy as np
import math
dimension = 128
n = 1000000
db_vectors = np.random.random((n, dimension)).astype('float32')
k = 3
dimension=128
query_vectors = np.random.random((n, dimension)).astype('float32')
code_size=16
nlist=math.floor(math.sqrt(n))
res = faiss.StandardGpuResources()
#define the ivfpq index in cpu
quantizer = faiss.IndexFlatL2(dimension) # coarse quantizer
#define the inverted index
index_ivfpq = faiss.IndexIVFPQ(quantizer, dimension, nlist, code_size, 8)
params = faiss.ParameterSpace().set_index_parameter(index_ivfpq, "verbose", 1)
#params.initialize(index_ivfpq)
index_ivfpq.train(db_vectors)
gpu_index_ivfpq = faiss.index_cpu_to_gpu(res, 0, index_ivfpq)
gpu_index_ivfpq.add(db_vectors)
Logs:
Training level-1 quantizer
Training level-1 quantizer on 1000000 vectors in 128D
Training IVF residual
Input training set too big (max size is 65536), sampling 65536 / 1000000 vectors
precomputing IVFPQ tables type 1
Summary
I would like to either enable moving the parameters, defined with ParameterSpace for a cpu index, to the GPU if the index is moved to the GPU or have a warning that flags that I need to reset the parameters once I move my index to GPU.
Platform
OS: Ubuntu 20.04.6
Faiss version:1.7.4
Installed from: conda
Running on:
Interface:
Reproduction instructions
An example is provided where I set the verbose mode to true using
ParameterSpace()
but I can't see the expected logs once I move my index to the gpu.Logs:
Expected logs: