Skip to content

Commit

Permalink
fix get_compile_options bug (#3785)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3785

Right now when avx512 is turned on, we will only return AVX2 in options. My understanding is turning on avx512 sets both the macros `__AVX2__` and `__AVX512F__`: https://fburl.com/vgh7jg9p

Reviewed By: asadoughi

Differential Revision: D61674490

fbshipit-source-id: 47292025b4eb5ef5907c4fbb0bbf39259129f6ee
  • Loading branch information
mengdilin authored and facebook-github-bot committed Aug 23, 2024
1 parent 5c87f13 commit 6053348
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion faiss/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ std::string get_compile_options() {

#ifdef __AVX2__
options += "AVX2 ";
#elif __AVX512F__
#ifdef __AVX512F__
options += "AVX512 ";
#endif
#elif defined(__ARM_FEATURE_SVE)
options += "SVE NEON ";
#elif defined(__aarch64__)
Expand Down

0 comments on commit 6053348

Please sign in to comment.