-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix test_cppcontrib_sa_decode.cpp #2388
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thanks that sounds good. |
@alexanderguzhva would you mind taking a look? |
@alexanderguzhva has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
BZO95
added a commit
to BZO95/faiss
that referenced
this pull request
Apr 10, 2025
Summary: This PR contains below changes: - Conform C++11 - [`faiss` is written in C++11](https://github.com/facebookresearch/faiss/blob/main/CONTRIBUTING.md#coding-style), but [`faiss/cppcontrib/SaDecodeKernels-avx2-inl.h`](https://github.com/facebookresearch/faiss/blob/442d9f4a2d43e2ada6423e8e4e3414131dea849d/faiss/cppcontrib/SaDecodeKernels-avx2-inl.h) and [the test](https://github.com/facebookresearch/faiss/blob/442d9f4a2d43e2ada6423e8e4e3414131dea849d/tests/test_cppcontrib_sa_decode.cpp) use some C++17 features. This PR rewrites these codes to make them independent to C++17. - Enable AVX2 on `faiss_test` - Currently `faiss_test` is compiled without `-mavx2` even if `-DFAISS_OPT_LEVEL=avx2` , so **`tests/test_cppcontrib_sa_decode.cpp` hasn't checked `faiss/cppcontrib/SaDecodeKernels-avx2-inl.h` at all** . This PR adds `-mavx2` to `faiss_test` if `-DFAISS_OPT_LEVEL=avx2` , so now `tests/test_cppcontrib_sa_decode.cpp` confirms `faiss/cppcontrib/SaDecodeKernels-avx2-inl.h` if `-DFAISS_OPT_LEVEL=avx2` , and does `faiss/cppcontrib/SaDecodeKernels-inl.h` if not `-DFAISS_OPT_LEVEL=avx2` . Pull Request resolved: facebookresearch/faiss#2388 Reviewed By: mdouze Differential Revision: D38005738 Pulled By: alexanderguzhva fbshipit-source-id: b9319c585c6849e1c7a4782770f2d7ce8c0d8660
aalekhpatel07
pushed a commit
to aalekhpatel07/faiss
that referenced
this pull request
Apr 10, 2025
Summary: This PR contains below changes: - Conform C++11 - [`faiss` is written in C++11](https://github.com/facebookresearch/faiss/blob/main/CONTRIBUTING.md#coding-style), but [`faiss/cppcontrib/SaDecodeKernels-avx2-inl.h`](https://github.com/facebookresearch/faiss/blob/442d9f4a2d43e2ada6423e8e4e3414131dea849d/faiss/cppcontrib/SaDecodeKernels-avx2-inl.h) and [the test](https://github.com/facebookresearch/faiss/blob/442d9f4a2d43e2ada6423e8e4e3414131dea849d/tests/test_cppcontrib_sa_decode.cpp) use some C++17 features. This PR rewrites these codes to make them independent to C++17. - Enable AVX2 on `faiss_test` - Currently `faiss_test` is compiled without `-mavx2` even if `-DFAISS_OPT_LEVEL=avx2` , so **`tests/test_cppcontrib_sa_decode.cpp` hasn't checked `faiss/cppcontrib/SaDecodeKernels-avx2-inl.h` at all** . This PR adds `-mavx2` to `faiss_test` if `-DFAISS_OPT_LEVEL=avx2` , so now `tests/test_cppcontrib_sa_decode.cpp` confirms `faiss/cppcontrib/SaDecodeKernels-avx2-inl.h` if `-DFAISS_OPT_LEVEL=avx2` , and does `faiss/cppcontrib/SaDecodeKernels-inl.h` if not `-DFAISS_OPT_LEVEL=avx2` . Pull Request resolved: facebookresearch#2388 Reviewed By: mdouze Differential Revision: D38005738 Pulled By: alexanderguzhva fbshipit-source-id: b9319c585c6849e1c7a4782770f2d7ce8c0d8660
aalekhpatel07
pushed a commit
to aalekhpatel07/faiss
that referenced
this pull request
Apr 10, 2025
Summary: This PR contains below changes: - Conform C++11 - [`faiss` is written in C++11](https://github.com/facebookresearch/faiss/blob/main/CONTRIBUTING.md#coding-style), but [`faiss/cppcontrib/SaDecodeKernels-avx2-inl.h`](https://github.com/facebookresearch/faiss/blob/442d9f4a2d43e2ada6423e8e4e3414131dea849d/faiss/cppcontrib/SaDecodeKernels-avx2-inl.h) and [the test](https://github.com/facebookresearch/faiss/blob/442d9f4a2d43e2ada6423e8e4e3414131dea849d/tests/test_cppcontrib_sa_decode.cpp) use some C++17 features. This PR rewrites these codes to make them independent to C++17. - Enable AVX2 on `faiss_test` - Currently `faiss_test` is compiled without `-mavx2` even if `-DFAISS_OPT_LEVEL=avx2` , so **`tests/test_cppcontrib_sa_decode.cpp` hasn't checked `faiss/cppcontrib/SaDecodeKernels-avx2-inl.h` at all** . This PR adds `-mavx2` to `faiss_test` if `-DFAISS_OPT_LEVEL=avx2` , so now `tests/test_cppcontrib_sa_decode.cpp` confirms `faiss/cppcontrib/SaDecodeKernels-avx2-inl.h` if `-DFAISS_OPT_LEVEL=avx2` , and does `faiss/cppcontrib/SaDecodeKernels-inl.h` if not `-DFAISS_OPT_LEVEL=avx2` . Pull Request resolved: facebookresearch#2388 Reviewed By: mdouze Differential Revision: D38005738 Pulled By: alexanderguzhva fbshipit-source-id: b9319c585c6849e1c7a4782770f2d7ce8c0d8660
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains below changes:
faiss
is written in C++11, butfaiss/cppcontrib/SaDecodeKernels-avx2-inl.h
and the test use some C++17 features. This PR rewrites these codes to make them independent to C++17.faiss_test
faiss_test
is compiled without-mavx2
even if-DFAISS_OPT_LEVEL=avx2
, sotests/test_cppcontrib_sa_decode.cpp
hasn't checkedfaiss/cppcontrib/SaDecodeKernels-avx2-inl.h
at all . This PR adds-mavx2
tofaiss_test
if-DFAISS_OPT_LEVEL=avx2
, so nowtests/test_cppcontrib_sa_decode.cpp
confirmsfaiss/cppcontrib/SaDecodeKernels-avx2-inl.h
if-DFAISS_OPT_LEVEL=avx2
, and doesfaiss/cppcontrib/SaDecodeKernels-inl.h
if not-DFAISS_OPT_LEVEL=avx2
.