Skip to content

Commit

Permalink
Disable simd for arm faiss (opensearch-project#166)
Browse files Browse the repository at this point in the history
Signed-off-by: John Mazanec <[email protected]>
Signed-off-by: Martin Gaievski <[email protected]>
  • Loading branch information
jmazanec15 authored and martin-gaievski committed Mar 7, 2022
1 parent 3372c90 commit 8ac277f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ac277f

Please sign in to comment.