-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Windows: portable intrinsics #1684
Conversation
01ca921
to
26fc7cf
Compare
The failing test seems to be flaky. |
Looking good, @mdouze could you take a look? |
I will take a look. The contbuild system on Linux does not compile with AVX2 enabled... |
Looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdouze has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@mdouze, would you prefer me to rebase this on master after #1690? Or anything else I can help with? I'm kinda waiting with conda-forge/faiss-split-feedstock#27 until this goes in because I don't want to get this patch wrong. |
Trying to compile windows for AVX2 in conda-forge/faiss-split-feedstock#27
(after #1600) surfaced a bunch of things (#1680, #1681, #1682), but the most voluminous problem
was MSVC being much worse at dealing with operator overloads and casts around
__m128
/__m256
.This lead to loads of errors that looked as follows:
I've followed https://software.intel.com/sites/landingpage/IntrinsicsGuide/ to try to replace everything correctly,
but this will surely require close review, because I'm not sure how well these code-paths are checked by the
test suite.
In any case, with the commits from #1600 #1666 #1680 #1681 #1682, I was able to build
libfaiss
&faiss
for AVX2 on windows (while remaining "green" on linux/osx, both with & without AVX2).
Sidenote: the issues in the last commit (26fc7cf)
were uncovered by adding the
__SSE3__
compat macros in #1681.