bitsun / faiss-windows

This is outdated,please refer to https://github.com/bitsun/faiss for windows build
Other
31 stars 8 forks source link

How can I start using it? #2

Open Ankur-singh opened 5 years ago

Ankur-singh commented 5 years ago

Sorry @bitsun but I have this really basic issue. How can I start using this in windows? I have already downloaded the .zip file. What next? It will be a great help if you could redirect me to some link discussing things in detail. I am just fresher in programming.

Platform

OS: Windows 10

Running on :

bitsun commented 5 years ago

There is a readme.txt file in tests subfolder, follow the instruction there. I will copy it here to build faiss-test project in windows, pleas take the following steps.

  1. install the latest windows sdk
  2. download intel math kernel library ,set enviroment variable MKL_PATH to the directory containg the static libraries of intel MKL
  3. install cuda 9.2,make sure enviroment variable CUDA_PATH is properly set
  4. download boost, and set enviroment variable BOOST_DIR to the directory of boost
  5. open command line prompt,go to boost directory,build boost-test with the following switches: .\b2 toolset=msvc-14.0 variant=release link=static architecture=x86 address-model=64 define=BOOST_TEST_NO_MAIN --with-test --stagedir=.\staticlib\x64
  6. We should now be able to build faiss-test project, and run some tests, for example to check the correctness of flat index implementation,run: faiss-test.exe --run_test=FlatIndex/FP32FlatIndexCPU

Step1 might be tricky, you can install python/anaconda on windows, then intel MKL libs are located in $(PythonDir)\Library\lib, just set MKL_PATH to $(PythonDir)\Library\lib, it then should find all the mkl static libraries there

Ankur-singh commented 5 years ago

thank @bitsun. I have completed all the step. I will be using faiss in python. So what should I do next to load faiss as "import faiss" inside python.

marcosboggia commented 4 years ago

Hi! I followed the steps from the readme.txt you mentioned but could't make it any further. How should I continue to obtain a built faiss to import in a python script? Thanks

bitsun commented 4 years ago

I did not make it work with python on windows

Marcos Boggia notifications@github.com schrieb am Do., 28. Mai 2020, 23:42:

Hi! I followed the steps from the readme.txt you mentioned but could't make it any further. How should I continue to obtain a built faiss to import in a python script? Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/2#issuecomment-635623713, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCBGRTX2DD53ONSUURDRT3LDVANCNFSM4HLXPR7Q .