Enet4 / faiss-rs

Rust language bindings for Faiss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different feature in Cargo.toml for link libfaiss_avx2.so

ava57r opened this issue · comments

Hello.
faiss builds in different file if set opt level avx2
file libfaiss_avx2.so

Add feature = avx2 in faiss_sys Cargo.toml
and link to libfaiss_avx2_c.so

Well, I would actually be inclined not to touch the bindings, and to correct this either at the main Faiss project or on each installation.

The fact that it uses avx2 is an implementation detail, which should not influence how the library is named or linked. faiss_c should always be the expected library name, and thus libfaiss_c.so should always be the file name on Linux platforms.

We also used to have a distinction between a native implementation with GPU features and one without, but that did not bring any benefit and is gone now.

So, unless the building process is changed so that the library name is the same regardless of these flags, you may need to rename or symlink that libfaiss_av2_c.so into libfaiss_c.so.

I agree.
Thanks.