Skip to content

Commit 6053348

Browse files
mengdilinfacebook-github-bot
authored andcommitted
fix get_compile_options bug (facebookresearch#3785)
Summary: Pull Request resolved: facebookresearch#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
1 parent 5c87f13 commit 6053348

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

faiss/utils/utils.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ std::string get_compile_options() {
117117

118118
#ifdef __AVX2__
119119
options += "AVX2 ";
120-
#elif __AVX512F__
120+
#ifdef __AVX512F__
121121
options += "AVX512 ";
122+
#endif
122123
#elif defined(__ARM_FEATURE_SVE)
123124
options += "SVE NEON ";
124125
#elif defined(__aarch64__)

0 commit comments

Comments
 (0)