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 to install in windows for used in python #5

Open caltyger-vinayak opened 4 years ago

caltyger-vinayak commented 4 years ago

how to install in windows for Python

bitsun commented 4 years ago

I am glad to inform you that i have ported the latest faiss to windows, and it is now available here https://github.com/bitsun/faiss

ramdhan1989 commented 4 years ago

I am glad to inform you that i have ported the latest faiss to windows, and it is now available here https://github.com/bitsun/faiss

is there any guide that easy to follow for installation on windows? does it work with python on windows ?

thank you

ramdhan1989 commented 4 years ago

I try to build gpu faiss and this is the result image

and this is inside build folder image

and this is inside build->lib->release image

is it good ? and what next ? build python wrapper steps are not clear to me. do we need to run the commands on commands prompt ? I have difficulty also to install swig on windows.

please advise,

thank you

bitsun commented 4 years ago

Hi, Check the file Install_cmake.md, you find very detailed instructions there

ramdhan1989 notifications@github.com schrieb am Sa., 18. Juli 2020, 08:15:

I am glad to inform you that i have ported the latest faiss to windows, and it is now available here https://github.com/bitsun/faiss

is there any guide that easy to follow ?to install on windows? does it work with python on windows ?

thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-660434990, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCDSXCENYM7BHNEOWGTR4E4YLANCNFSM4NI36ANQ .

bitsun commented 4 years ago

This looks good, the python wrapper installation can be found in install_cmake.md file. You will need to install swig yourself before you start.

ramdhan1989 notifications@github.com schrieb am Sa., 18. Juli 2020, 11:56:

I try to build gpu faiss and this is the result [image: image] https://user-images.githubusercontent.com/41245856/87849896-6047c080-c916-11ea-8e60-e7286323db08.png

and this is inside build folder [image: image] https://user-images.githubusercontent.com/41245856/87849961-c6ccde80-c916-11ea-97ec-5a6fd7137c91.png

and this is inside build->lib->release [image: image] https://user-images.githubusercontent.com/41245856/87850028-3fcc3600-c917-11ea-9786-21cdecd9383f.png

is it good ? and what next ? build python wrapper steps are not clear to me. do we need to run the commands on commands prompt ? I have difficulty also to install swig on windows.

please advise,

thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-660458981, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCFY4TBMKZCIQ4AFSS3R4FWVBANCNFSM4NI36ANQ .

ramdhan1989 commented 4 years ago

please help, I got a problem in the last step. Kindly need your clarification about blue circle below. what should I do with -I....\ ? does it refer to any path ? image

I try with my best but got this problem image

please advise thank you

bitsun commented 4 years ago

You need do this by starting from visual studio developer command prompt, otherwise some header files can not be found

ramdhan1989 notifications@github.com schrieb am Sa., 18. Juli 2020, 15:47:

please help, I got a problem in the last step. Kindly need your clarification about blue circle below. what should I do with -I....\ ? does it refer to any path ? [image: image] https://user-images.githubusercontent.com/41245856/87853825-c42eb100-c937-11ea-8b27-c867bbe15eb7.png

I try with my best but got this problem [image: image] https://user-images.githubusercontent.com/41245856/87853840-da3c7180-c937-11ea-93f7-c41de9504162.png

please advise thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-660485516, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCFYIDU6HJQ2V4ZQSSDR4GRYBANCNFSM4NI36ANQ .

ramdhan1989 commented 4 years ago

still problem. this is the result image

image

any idea ?

bitsun commented 4 years ago

make sure you open the developer command prompt for x64 instead of x86. As stated in the installation guide, only 64 bit is supported

ramdhan1989 notifications@github.com schrieb am So., 19. Juli 2020, 04:09:

still problem. this is the result [image: image] https://user-images.githubusercontent.com/41245856/87865432-6d5cc200-c99f-11ea-9638-eebf9b27152e.png

[image: image] https://user-images.githubusercontent.com/41245856/87865440-81a0bf00-c99f-11ea-9a62-1461bb171149.png

any idea ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-660573219, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCCNU6OMOXKWFQZVDD3R4JIWJANCNFSM4NI36ANQ .

ramdhan1989 commented 4 years ago

make sure you open the developer command prompt for x64 instead of x86. As stated in the installation guide, only 64 bit is supported ramdhan1989 notifications@github.com schrieb am So., 19. Juli 2020, 04:09: still problem. this is the result [image: image] https://user-images.githubusercontent.com/41245856/87865432-6d5cc200-c99f-11ea-9638-eebf9b27152e.png [image: image] https://user-images.githubusercontent.com/41245856/87865440-81a0bf00-c99f-11ea-9a62-1461bb171149.png any idea ? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCCNU6OMOXKWFQZVDD3R4JIWJANCNFSM4NI36ANQ .

thank you, But I now got different error

image

please advice,, thank you

bitsun commented 4 years ago

Please open the right developer command prompt, you have opened the one for ARM architecture

ramdhan1989 commented 4 years ago

Please open the right developer command prompt, you have opened the one for ARM architecture

would you mind telling me how to open the right one ? I opened it thru Ms Visual Studio.

  1. go to tools --> external tools --> add name = command prompt Command=%comspec% argument= /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" amd64_arm initial directory = $(SolutionDir)
  2. then tools --> command prompt which part should I revise ?

I need your clarification as well. is the command below already correct ? cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -IC:/Users/Owner/shopee/title_translation/ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:%MKL_INCLUDE_DIRS%/../lib/intel64 /LIBPATH:%MKL_INCLUDE_DIRS%/../lib/intel64/Release /LIBPATH:%MKL_INCLUDE_DIRS%/../../compiler/lib/intel64 /LIBPATH:%MKL_INCLUDE_DIRS%/../../compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd

please advise thank you

bitsun commented 4 years ago

press windows start icon and search "x64 native tools command prompt for vs 2017/2019"

On Mon, Jul 20, 2020 at 1:56 PM ramdhan1989 notifications@github.com wrote:

Please open the right developer command prompt, you have opened the one for ARM architecture

would you mind telling me how to open the right one ? I opened it thru Ms Visual Studio.

  1. go to tools --> external tools --> add name = command prompt Command=%comspec% argument= /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" amd64_arm initial directory = $(SolutionDir)
  2. then tools --> command prompt

is the command below already correct ? cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -IC:/Users/Owner/shopee/title_translation/ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:%MKL_INCLUDE_DIRS%/../lib/intel64 /LIBPATH:%MKL_INCLUDE_DIRS%/../lib/intel64/Release /LIBPATH:%MKL_INCLUDE_DIRS%/../../compiler/lib/intel64 /LIBPATH:%MKL_INCLUDE_DIRS%/../../compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd

please advise thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-660982397, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCDKMDVNITLJIHAXCZ3R4QWIXANCNFSM4NI36ANQ .

-- 祝好| Mit Freundlichen Grüßen | best regards

Bin Liu | 刘斌

ramdhan1989 commented 4 years ago

x64 native tools command prompt

Nice, thank you. there is still an error as follow `C:\Users\Owner\shopee\title_translation\faiss\python>cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -I....\ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

swigfaiss_wrap.cxx C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc swigfaiss_wrap.cxx(4383): warning C4312: 'type cast': conversion from 'long' to 'float ' of greater size swigfaiss_wrap.cxx(4387): warning C4312: 'type cast': conversion from 'long' to 'long ' of greater size swigfaiss_wrap.cxx(4391): warning C4312: 'type cast': conversion from 'long' to 'int *' of greater size Microsoft (R) Incremental Linker Version 14.16.27035.0 Copyright (C) Microsoft Corporation. All rights reserved.

/out:swigfaiss_wrap.dll /dll /implib:swigfaiss_wrap.lib /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release "/LIBPath:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd swigfaiss_wrap.obj ../build/lib/Release/gpufaiss.lib ../build/lib/Release/faiss.lib python37.lib cudart_static.lib cublas.lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib LINK : fatal error LNK1181: cannot open input file 'Files.obj'`

please advise, thank you

bitsun commented 4 years ago

It seems that you are almost there. But this "cannot open input file Files.obj" is quite strange to me. These commands will not generate such obj file. To find out what went wrong, i suggest you turn on the verbose option of cl.exe(by adding /VERBOSE )

On Tue, Jul 21, 2020 at 3:19 AM ramdhan1989 notifications@github.com wrote:

x64 native tools command prompt

Nice, thank you. there is still an error : `C:\Users\Owner\shopee\title_translation\faiss\python>cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -I....\ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

swigfaiss_wrap.cxx C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc swigfaiss_wrap.cxx(4383): warning C4312: 'type cast': conversion from 'long' to 'float ' of greater size swigfaiss_wrap.cxx(4387): warning C4312: 'type cast': conversion from 'long' to 'long ' of greater size swigfaiss_wrap.cxx(4391): warning C4312: 'type cast': conversion from 'long' to 'int *' of greater size Microsoft (R) Incremental Linker Version 14.16.27035.0 Copyright (C) Microsoft Corporation. All rights reserved.

/out:swigfaiss_wrap.dll /dll /implib:swigfaiss_wrap.lib /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release "/LIBPath:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd swigfaiss_wrap.obj ../build/lib/Release/gpufaiss.lib ../build/lib/Release/faiss.lib python37.lib cudart_static.lib cublas.lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib LINK : fatal error LNK1181: cannot open input file 'Files.obj'`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-661527084, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCFQ6TJFSZKZYACCJVLR4TUJVANCNFSM4NI36ANQ .

-- 祝好| Mit Freundlichen Grüßen | best regards

Bin Liu | 刘斌

ramdhan1989 commented 4 years ago

I add /VERBOSE and return as follow (did I add verbose correctly ?) Starting pass 1 LINK : fatal error LNK1181: cannot open input file 'Files.obj

below is the detail:

`C:\Users\Owner\shopee\title_translation\faiss\python>cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -I....\ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd /VERBOSE Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

swigfaiss_wrap.cxx C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc swigfaiss_wrap.cxx(4383): warning C4312: 'type cast': conversion from 'long' to 'float ' of greater size swigfaiss_wrap.cxx(4387): warning C4312: 'type cast': conversion from 'long' to 'long ' of greater size swigfaiss_wrap.cxx(4391): warning C4312: 'type cast': conversion from 'long' to 'int *' of greater size Microsoft (R) Incremental Linker Version 14.16.27035.0 Copyright (C) Microsoft Corporation. All rights reserved.

/out:swigfaiss_wrap.dll /dll /implib:swigfaiss_wrap.lib /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release "/LIBPath:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd /VERBOSE swigfaiss_wrap.obj ../build/lib/Release/gpufaiss.lib ../build/lib/Release/faiss.lib python37.lib cudart_static.lib cublas.lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

Starting pass 1 LINK : fatal error LNK1181: cannot open input file 'Files.obj'`

please advice

thank you

bitsun commented 4 years ago

Seems to be related to https://stackoverflow.com/questions/10481193/errors-when-compiling-library-in-command-line. Please try to quote the path

ramdhan1989 notifications@github.com schrieb am Di., 21. Juli 2020, 12:29:

I add /VERBOSE and return as follow (did I add verbose correctly ?) Starting pass 1 LINK : fatal error LNK1181: cannot open input file 'Files.obj

below is the detail:

`C:\Users\Owner\shopee\title_translation\faiss\python>cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -I....\ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd /VERBOSE Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

swigfaiss_wrap.cxx C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc swigfaiss_wrap.cxx(4383): warning C4312: 'type cast': conversion from 'long' to 'float ' of greater size swigfaiss_wrap.cxx(4387): warning C4312: 'type cast': conversion from 'long' to 'long ' of greater size swigfaiss_wrap.cxx(4391): warning C4312: 'type cast': conversion from 'long' to 'int *' of greater size Microsoft (R) Incremental Linker Version 14.16.27035.0 Copyright (C) Microsoft Corporation. All rights reserved.

/out:swigfaiss_wrap.dll /dll /implib:swigfaiss_wrap.lib /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files

(x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release "/LIBPath:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd /VERBOSE swigfaiss_wrap.obj ../build/lib/Release/gpufaiss.lib ../build/lib/Release/faiss.lib python37.lib cudart_static.lib cublas.lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

Starting pass 1 LINK : fatal error LNK1181: cannot open input file 'Files.obj'`

please advice

thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-661774949, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCHRMAB45YVAYURTCCLR4VUY3ANCNFSM4NI36ANQ .

ramdhan1989 commented 4 years ago

Nice, it is successful In the installation guide mentioned "there should be 3 files in this folder, namely init.py, _swigfaiss.pyd, swigfaiss.py" I couldn't find init.py image

the next step is copying those files (inside "python" folder in my case) to $(PythonHome)/Lib, isn't it ? Please advise

thank you

bitsun commented 4 years ago

Please follow step 6,7 in the INSTALL_cmake.md

On Wed, Jul 22, 2020 at 1:45 AM ramdhan1989 notifications@github.com wrote:

Seems to be related to https://stackoverflow.com/questions/10481193/errors-when-compiling-library-in-command-line. Please try to quote the path ramdhan1989 notifications@github.com schrieb am Di., 21. Juli 2020, 12:29: … <#m1942668351253408962> I add /VERBOSE and return as follow (did I add verbose correctly ?) Starting pass 1 LINK : fatal error LNK1181: cannot open input file 'Files.obj below is the detail: C:\Users\Owner\shopee\title_translation\faiss\python>cl "swigfaiss_wrap.cxx" "../build/lib/Release/gpufaiss.lib" "../build/lib/Release/faiss.lib" python37.lib "cudart_static.lib" "cublas.lib" "mkl_intel_lp64.lib" "mkl_core.lib" "mkl_intel_thread.lib" "libiomp5md.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" /LD /MD -I"%CUDA_PATH%/include" -IC:\Users\Owner\Anaconda3\include -IC:\Users\Owner\Anaconda3\Lib\site-packages\numpy\core\include -I....\ /link /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release /LIBPath:"%CUDA_PATH%/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd /VERBOSE Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x64 Copyright (C) Microsoft Corporation. All rights reserved. swigfaiss_wrap.cxx C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc swigfaiss_wrap.cxx(4383): warning C4312: 'type cast': conversion from 'long' to 'float ' of greater size swigfaiss_wrap.cxx(4387): warning C4312: 'type cast': conversion from 'long' to 'long ' of greater size swigfaiss_wrap.cxx(4391): warning C4312: 'type cast': conversion from 'long' to 'int *' of greater size Microsoft (R) Incremental Linker Version 14.16.27035.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:swigfaiss_wrap.dll /dll /implib:swigfaiss_wrap.lib /MACHINE:X64 /INCREMENTAL:NO /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/mkl/lib/intel64/Release /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64 /LIBPATH:C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.1.216/windows/compiler/lib/intel64/Release "/LIBPath:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1/lib/x64" /LIBPath:C:\Users\Owner\Anaconda3\libs /OUT:_swigfaiss.pyd /VERBOSE swigfaiss_wrap.obj ../build/lib/Release/gpufaiss.lib ../build/lib/Release/faiss.lib python37.lib cudart_static.lib cublas.lib mkl_intel_lp64.lib mkl_core.lib mkl_intel_thread.lib libiomp5md.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib Starting pass 1 LINK : fatal error LNK1181: cannot open input file 'Files.obj' please advice thank you — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5 (comment) https://github.com/bitsun/faiss-windows/issues/5#issuecomment-661774949>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCHRMAB45YVAYURTCCLR4VUY3ANCNFSM4NI36ANQ .

Nice, it is successful In the installation guide mentioned "there should be 3 files in this folder, namely init.py, _swigfaiss.pyd, swigfaiss.py" I couldn't find init.py [image: image] https://user-images.githubusercontent.com/41245856/88117852-68d61a80-cbe6-11ea-8d64-c3c7617994cc.png

the next step is copying those files (inside "python" folder in my case) to $(PythonHome)/Lib, isn't it ? Please advise

thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitsun/faiss-windows/issues/5#issuecomment-662162032, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNCQCGVIC6IFRKOET5ALQTR4YSB5ANCNFSM4NI36ANQ .

-- 祝好| Mit Freundlichen Grüßen | best regards

Bin Liu | 刘斌

ramdhan1989 commented 4 years ago

Finally, It is successfull . is there any way to check faiss I used is for GPU ? as I remember I built following for faiss-gpu but just to make it sure

thank you