Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rolling upgrade bwc workflow avx512spr #2444

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/backwards_compatibility_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,19 @@ jobs:
echo "Running rolling-upgrade backwards compatibility tests ..."
if lscpu | grep -i avx512f | grep -i avx512cd | grep -i avx512vl | grep -i avx512dq | grep -i avx512bw
then
if lscpu | grep -q "GenuineIntel" && lscpu | grep -i avx512_fp16 | grep -i avx512_bf16 | grep -i avx512_vpopcntdq
then
echo "the system is an Intel(R) Sapphire Rapids or a newer-generation processor"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_RESTART_UPGRADE -Dnproc.count=`nproc` -Davx512_spr.enabled=true
else
echo "avx512 available on system"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc`
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512_spr.enabled=false
fi
elif lscpu | grep -i avx2
then
echo "avx2 available on system"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512.enabled=false
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512_spr.enabled=false -Davx512.enabled=false
else
echo "avx512 and avx2 not available on system"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Davx2.enabled=false -Davx512.enabled=false -Dsimd.enabled=false -Dnproc.count=`nproc`
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Davx2.enabled=false -Davx512_spr.enabled=false -Davx512.enabled=false -Dsimd.enabled=false -Dnproc.count=`nproc`
fi
9 changes: 6 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,12 @@ fi
# 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=10.0.0
if [ `uname -m` = "x86_64" ]; then
GCC_REQUIRED_VERSION=12.4.0
if [ "$ARCHITECTURE" = "x64" ]; then
# https://github.com/opensearch-project/opensearch-build/issues/5226
# We need gcc version >=12.4 to build Faiss Sapphire library(avx512_spr)
GCC_REQUIRED_VERSION=12.4
else
GCC_REQUIRED_VERSION=9.0.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
Expand Down
Loading