Faiss GPU: fix gpu 0 usage if gpu 0 is not used (GitHub issue 2178) (#2182)
Faiss GPU: fix gpu 0 usage if gpu 0 is not used (GitHub issue 2178) (#2182)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2182

This diff fixes the issue in https://github.com/facebookresearch/faiss/issues/2178

namely that cudaHostAlloc does seem to perform some GPU initialization on the current device that is active.

Reviewed By: beauby

Differential Revision: D33480473

fbshipit-source-id: 4dc76c12b7be2caa96294bbb1aeaf9a44d030ae9

facebookresearch/faiss,facebookresearch/faiss,facebookresearch/faiss,facebookresearch/faiss