fwaris / FaissNet

Other
11 stars 1 forks source link

Could you share the compiled faiss library with me? #2

Open Algabeno opened 3 months ago

Algabeno commented 3 months ago

Your project is excellent, but did I have problems compiling faiss library in windows? Could you share the compiled faiss library with me?

fwaris commented 3 months ago

clone faiss repo and use the following CMD commands to build for windows:

set MKL_PATH=<your path>\Faiss.Net\packages\intelmkl.redist.win-x64.2023.1.0.46356\runtimes\win-x64\native

cmake -Wno-dev -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DFAISS_ENABLE_C_API=OFF -DBUILD_TESTING=OFF -DBLA_VENDOR=Intel10_64_dyn "-DMKL_LIBRARIES=%MKL_PATH%/mkl_intel_lp64_dll.lib;%MKL_PATH%/mkl_intel_thread_dll.lib;%MKL_PATH%/mkl_core_dll.lib" -DBUILD_SHARED_LIBS=OFF -B build -S .

cmake --build build --config Release --target faiss
cmake --build build --config Debug --target faiss

faiss.zip

The faiss lib file is in the Release directory

Note: the MKL libraries are pulled from nuget using the MklHook project. It pulls c++ 'nuget' packages into the 'packages' directory. This is referred to in the faiss cmake command (above).

(fyi cmake creates the VS c++ project files first and then builds the project)

Algabeno commented 3 months ago

Thank you very much for your generous sharing.