It is easy to accidentally attempt to run code only intended for devices with GPUs on a device without a GPU.
To prevent catastrophic crashes faiss handles cudaErrorNoDevice gracefully in getNumDevices. I would propose that cudaErrorInsufficientDriver is handled equally, as it also indicates no device is available. (resulting in an exception in code down the line of course, but not an abort() as is right now.)
It is easy to accidentally attempt to run code only intended for devices with GPUs on a device without a GPU.
To prevent catastrophic crashes faiss handles
cudaErrorNoDevicegracefully ingetNumDevices. I would propose thatcudaErrorInsufficientDriveris handled equally, as it also indicates no device is available. (resulting in an exception in code down the line of course, but not anabort()as is right now.)