Skip to content

Commit

Permalink
Properly set gcc version lock on x64 and arm64 for avx512_spr support (
Browse files Browse the repository at this point in the history
…#2457)

Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Jan 28, 2025
1 parent d142366 commit 612c3b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ fi
# https://github.com/opensearch-project/k-NN/issues/975
# https://github.com/opensearch-project/k-NN/issues/1138
# https://github.com/opensearch-project/opensearch-build/issues/4386
# 20250127: Require at least GCC 12 to support avx512_spr on x64, while keep GCC 10 on arm64
# https://github.com/opensearch-project/opensearch-build/issues/5226
GCC_VERSION=`gcc --version | head -n 1 | cut -d ' ' -f3`
GCC_REQUIRED_VERSION=12.4
GCC_REQUIRED_VERSION=10.0.0
if [ `uname -m` = "x86_64" ]; then
GCC_REQUIRED_VERSION=12.4.0
fi
COMPARE_VERSION=`echo $GCC_REQUIRED_VERSION $GCC_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
if [ "$COMPARE_VERSION" != "$GCC_REQUIRED_VERSION" ]; then
echo "gcc version on this env is older than $GCC_REQUIRED_VERSION, exit 1"
Expand Down

0 comments on commit 612c3b5

Please sign in to comment.