kyamagu / faiss-wheels

Unofficial faiss wheel builder
MIT License
284 stars 37 forks source link

Support AVX2 extension #65

Closed kyamagu closed 1 year ago

kyamagu commented 1 year ago

Changes:

kyamagu commented 1 year ago

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 commented 1 year ago

Still missing swigfaiss_avx2.py file in the package.

kyamagu commented 1 year ago

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