As faiss-gpu does not support windows i am forced to use faiss-cpu (which i would like do to as initializing my model with it takes about 4 minutes compared to the 38 minutes it takes with scikit-learn) I run in to the an error after getting through the first training epoch:
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
as it looked to me like the NNVariationalStrategy class uses the device of its inducing_points attribute to set the device on other tensors it creates i tried to set
model.variational_strategy.inducing_points = train_x after setting train_x = train_x.cuda() and also separately i tried setting model.variational_strategy.nn_util.to('cuda:0').
From what i can tell in both cases the inducing_points tensor gets set to cuda, but im not sure if it does much else as model.variational_strategy.current_training_indices.device for example will still return device(type='cpu')
I have also unsuccessfully tried to find where the RuntimeError comes from, hoping i can see exactly which indexed tensor its talking about.
Any help or insight would be much appreciated.