From edf10093fd7759fa33f37b200471c0f90b30c1e8 Mon Sep 17 00:00:00 2001 From: Mengdi Lin Date: Thu, 22 Aug 2024 13:38:56 -0700 Subject: [PATCH] fix get_compile_options bug Summary: 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 --- faiss/utils/utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/faiss/utils/utils.cpp b/faiss/utils/utils.cpp index beae93ac16..fef8aa1c72 100644 --- a/faiss/utils/utils.cpp +++ b/faiss/utils/utils.cpp @@ -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__)