Skip to content

Commit 2326546

Browse files
Fix failing rolling upgrade workflow
Signed-off-by: Naveen Tatikonda <[email protected]>
1 parent 0b9e3d0 commit 2326546

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/backwards_compatibility_tests_workflow.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,19 @@ jobs:
120120
echo "Running rolling-upgrade backwards compatibility tests ..."
121121
if lscpu | grep -i avx512f | grep -i avx512cd | grep -i avx512vl | grep -i avx512dq | grep -i avx512bw
122122
then
123+
if lscpu | grep -q "GenuineIntel" && lscpu | grep -i avx512_fp16 | grep -i avx512_bf16 | grep -i avx512_vpopcntdq
124+
then
125+
echo "the system is an Intel(R) Sapphire Rapids or a newer-generation processor"
126+
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_RESTART_UPGRADE -Dnproc.count=`nproc` -Davx512_spr.enabled=true
127+
else
123128
echo "avx512 available on system"
124-
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc`
129+
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512_spr.enabled=false
130+
fi
125131
elif lscpu | grep -i avx2
126132
then
127133
echo "avx2 available on system"
128-
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512.enabled=false
134+
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512_spr.enabled=false -Davx512.enabled=false
129135
else
130-
echo "avx512 and avx2 not available on system"
131-
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Davx2.enabled=false -Davx512.enabled=false -Dsimd.enabled=false -Dnproc.count=`nproc`
136+
echo "avx512_spr, avx512 and avx2 not available on system"
137+
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Davx512_spr.enabled=false -Davx2.enabled=false -Davx512.enabled=false -Dsimd.enabled=false -Dnproc.count=`nproc`
132138
fi

scripts/build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ fi
112112
# https://github.com/opensearch-project/k-NN/issues/1138
113113
# https://github.com/opensearch-project/opensearch-build/issues/4386
114114
GCC_VERSION=`gcc --version | head -n 1 | cut -d ' ' -f3`
115-
GCC_REQUIRED_VERSION=12.4
115+
if [ "$ARCHITECTURE" = "x64" ]; then
116+
# https://github.com/opensearch-project/opensearch-build/issues/5226
117+
# We need gcc version >=12.4 to build Faiss Sapphire library(avx512_spr)
118+
GCC_REQUIRED_VERSION=12.4
119+
else
120+
GCC_REQUIRED_VERSION=9.0.0
121+
fi
116122
COMPARE_VERSION=`echo $GCC_REQUIRED_VERSION $GCC_VERSION | tr ' ' '\n' | sort -V | uniq | head -n 1`
117123
if [ "$COMPARE_VERSION" != "$GCC_REQUIRED_VERSION" ]; then
118124
echo "gcc version on this env is older than $GCC_REQUIRED_VERSION, exit 1"

0 commit comments

Comments
 (0)