-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build error on windows by vs2022 #2985
Comments
please do not post screenshots. |
Although we don't support compiling GPU Faiss for windows, if there is an easy fix then we'd intergrate it. It seems that VC++ does not support some syntax here. https://github.com/facebookresearch/faiss/blob/main/faiss/gpu/impl/PQCodeDistances-inl.cuh#L541 @wickedfoo any idea what's the issue here? |
create a personal dirty-hack to workaround this issue: https://github.com/yexiangyu/faiss/tree/v1.7.4-win |
If anybody else comes across this, I was able to solve this specific build error. Before you compile, edit 2 lines in faiss/gpu/impl/PQCodeDistances-inl.cuh:
I am pretty inexperienced in C++, so I do not necessarily know if only one of these lines is necessary, but changing both lines worked for me and I'm too scared to touch it again. A good explanation of why the Worth pointing out that unless there is some way to bulk-dllimport everything in a header or something like that, the lack of |
Summary
1>.../faiss-1.7.4\faiss/gpu/impl/PQCodeDistances-inl.cuh(541): error : expected an expression
1> auto outDistancesCodeViewCols = outCodeDistancesView.view<2>({coarseIndices.getSize(0) * coarseIndices.getSize(1),
1> ^
1>
1>1 error detected in the compilation of ".../faiss-1.7.4/faiss/gpu/impl/IVFPQ.cu".
Platform
OS: WIN11
Faiss version: 1.7.4
Installed from: just build for c++; cmake -B build . -DFAISS_ENABLE_PYTHON=OFF -DFAISS_ENABLE_GPU=ON -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON
Faiss compilation options:
Running on:
Interface:
Reproduction instructions
The text was updated successfully, but these errors were encountered: