Skip to content
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

Support AVX2 extension #65

Merged
merged 22 commits into from
Nov 17, 2022
Merged

Support AVX2 extension #65

merged 22 commits into from
Nov 17, 2022

Conversation

kyamagu
Copy link
Owner

@kyamagu kyamagu commented Nov 16, 2022

Changes:

@kyamagu
Copy link
Owner Author

kyamagu commented Nov 16, 2022

It seems avx2 build on windows is broken. Errors like the following appear, which indicate the use of GNU-specific SIMD types (__m128i_u ) not supported in MSVC.

       4>D:\a\faiss-wheels\faiss-wheels\faiss\faiss\IndexIVFPQ.cpp(934,48): error C2146: syntax error: missing ')' before identifier '__m128i_u' [D:\a\faiss-wheels\faiss-wheels\faiss\build\faiss\faiss_avx2.vcxproj]
       4>D:\a\faiss-wheels\faiss-wheels\faiss\faiss\IndexIVFPQ.cpp(934,48): error C2065: '__m128i_u': undeclared identifier [D:\a\faiss-wheels\faiss-wheels\faiss\build\faiss\faiss_avx2.vcxproj]
       4>D:\a\faiss-wheels\faiss-wheels\faiss\faiss\IndexIVFPQ.cpp(934,58): error C2059: syntax error: ')' [D:\a\faiss-wheels\faiss-wheels\faiss\build\faiss\faiss_avx2.vcxproj]
       4>D:\a\faiss-wheels\faiss-wheels\faiss\faiss\IndexIVFPQ.cpp(934,1): error C2059: syntax error: ')' [D:\a\faiss-wheels\faiss-wheels\faiss\build\faiss\faiss_avx2.vcxproj]

@kyamagu
Copy link
Owner Author

kyamagu commented Nov 17, 2022

Still missing swigfaiss_avx2.py file in the package.

@kyamagu kyamagu merged commit 7b57ac6 into main Nov 17, 2022
@kyamagu kyamagu deleted the support-avx2 branch November 17, 2022 10:09
@kyamagu
Copy link
Owner Author

kyamagu commented Nov 17, 2022

In the long run, faiss should implement a dispatcher within C++ to support CPU features.
https://blog.magnum.graphics/backstage/cpu-feature-detection-dispatch/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModuleNotFoundError: No module named 'faiss.swigfaiss_avx2'
1 participant