Closed hkunzhe closed 3 years ago
It's a similar issue with #65. I've tested faiss-gpu with cudatoolkit 10.0 and tsnecuda with cuda100 working fine.
Yes - I think it remains outstanding to build our latest version of the code linking dynamically against the faiss-gpu libraries from conda-forge.
Our current build from source will build faiss-GPU in addition to tsnecuda, linking against the local version. If you have a second version of faiss resident in conda, I'm not sure exactly what happens - it likely tries to link against the conda-forge version, which is different from the static symbol compiled into the local version of the code.
The best solution seems to be to build tsnecuda from source, and alter the CMakeLists.txt to link against faiss-GPU as a dynamic library instead of linking statically against a locally compiled version. At the time we wrote this library, this wasn't an option, but it seems like it may be possible now.
Ok, I got it! Thank you very much:)
Since faiss-gpu doesn't provide compiled binaries with cuda10.1, 10.2, and 11.0, see this issue for details. Thus, I install faiss from the channel conda-forge by:
However, when I run:
It shows an OSError: anaconda3/envs/test/lib/python3.7/site-packages/tsnecuda/libtsnecuda.so: undefined symbol: _ZTIN5faiss11IndexShardsE.
Steps to reproduce:
tsnecuda.test()
.