This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch faiss
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/faiss by this push:
new eb245ae0bff mac os skip mfma (#355)
eb245ae0bff is described below
commit eb245ae0bffb7f871c08c2f2db6ca9d01311a9f4
Author: Jensen <[email protected]>
AuthorDate: Thu Sep 4 09:50:12 2025 +0800
mac os skip mfma (#355)
---
CMakeLists.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d780b58ddb..c4f8b0aeba9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,7 +70,15 @@ option(FAISS_USE_LTO "Enable Link-Time optimization" OFF)
# compile error:
# simdlib_avx2.h:695:25: error: always_inline function '_mm256_fmadd_ps'
requires target feature 'fma', but would be inlined into function 'fmadd' that
is compiled without support for 'fma'
# if fixed by -mfma
-add_compile_options(-Wno-everything -mfma)
+
+# Suppress warnings everywhere
+add_compile_options(-Wno-everything)
+
+# Only add -mfma on x86_64
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
+ add_compile_options(-mfma)
+endif()
+
if(FAISS_ENABLE_GPU)
if(FAISS_ENABLE_ROCM)
enable_language(HIP)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]