Enet4 / faiss-rs

Rust language bindings for Faiss
Apache License 2.0
200 stars 36 forks source link

how to build gpufaiss_c correctly? #88

Open 152334H opened 3 weeks ago

152334H commented 3 weeks ago

Sorry for dumb question. When I follow the instructions here with -DFAISS_ENABLE_C_API=ON, I obtain libfaiss_c.so with no apparent GPU equivalent in the build/c_api/gpu folder. The suggestion to run make in the GPU subfolder does not help.

I have checked the pypi/conda packages for gpu faiss and they do not contain the C API shared object either.

Enet4 commented 3 weeks ago

You also need to set -DFAISS_ENABLE_GPU=ON, plus any other GPU related option for your environment. When coupled with FAISS_ENABLE_C_API, this should automatically produce the gpufaiss_c library.

The suggestion to run make in the GPU subfolder does not help.

Oops, that suggestion is outdated. The official building process is no longer directly through GNU Makefiles but through CMake.