From 8ac277f9d6406b7ce0c09d1af915deba9323651b Mon Sep 17 00:00:00 2001 From: Jack Mazanec Date: Fri, 29 Oct 2021 15:53:22 -0700 Subject: [PATCH] Disable simd for arm faiss (#166) Signed-off-by: John Mazanec Signed-off-by: Martin Gaievski --- scripts/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 3b7ea7ca0..7b1655c0c 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -78,9 +78,11 @@ if [ "$ARCHITECTURE" = "x64" ]; then sed -i -e 's/-march=native/-march=x86-64/g' external/nmslib/similarity_search/CMakeLists.txt fi -# For arm, march=native is broken in centos 7. Manually override to lowest version of armv8. +# For arm, march=native is broken in centos 7. Manually override to lowest version of armv8. Also, disable simd in faiss +# file. This is broken on centos 7 as well. if [ "$ARCHITECTURE" = "arm64" ]; then sed -i -e 's/-march=native/-march=armv8-a/g' external/nmslib/similarity_search/CMakeLists.txt + sed -i -e 's/__aarch64__/__undefine_aarch64__/g' external/faiss/faiss/utils/distances_simd.cpp fi if [ "$JAVA_HOME" = "" ]; then