Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix CD failure due to illegal instruction in OpenBLAS #18408

Merged
merged 3 commits into from
May 27, 2020
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
2 changes: 1 addition & 1 deletion tools/dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The dependencies could be categorized by several groups: BLAS libraries, CPU-bas

| Dependencies | MXNet Version |
| :------------: |:-------------:|
|OpenBLAS| 0.3.3 |
|OpenBLAS| 0.3.9 |
|MKLDNN| 0.19 |
|CUDA| 10.1 |
|cuDNN| 7.5.1 |
Expand Down
10 changes: 5 additions & 5 deletions tools/dependencies/openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@

# This script builds the static library of openblas that can be used as dependency of mxnet.
set -ex
OPENBLAS_VERSION=0.3.7
OPENBLAS_VERSION=4a4c50a7cef9fa91f14e508722f502d956ad5192
if [[ ((! -e $DEPS_PATH/lib/libopenblas.a) && -z "$CMAKE_STATICBUILD") ||
((! -e $DEPS_PATH/lib/libopenblas.so) && -v CMAKE_STATICBUILD) ]]; then
# download and build openblas
>&2 echo "Building openblas..."

download \
https://github.com/xianyi/OpenBLAS/archive/v${OPENBLAS_VERSION}.zip \
https://github.com/xianyi/OpenBLAS/archive/${OPENBLAS_VERSION}.zip \
${DEPS_PATH}/openblas.zip
unzip -q $DEPS_PATH/openblas.zip -d $DEPS_PATH
pushd .
cd $DEPS_PATH/OpenBLAS-$OPENBLAS_VERSION
cd $DEPS_PATH/OpenBLAS-${OPENBLAS_VERSION}

# Adding NO_DYNAMIC=1 flag causes make install to fail
CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 USE_OPENMP=1
CXX="g++ -fPIC" CC="gcc -fPIC" $MAKE DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_OPENMP=1

if [[ -v CMAKE_STATICBUILD ]]; then
# We link and redistribute libopenblas.so for cmake staticbuild
Expand All @@ -46,7 +46,7 @@ if [[ ((! -e $DEPS_PATH/lib/libopenblas.a) && -z "$CMAKE_STATICBUILD") ||

if [[ -z "$CMAKE_STATICBUILD" ]]; then
# Manually removing .so to avoid linking against it
rm $DEPS_PATH/lib/libopenblasp-r${OPENBLAS_VERSION}.so
rm $DEPS_PATH/lib/libopenblas*.so
fi

popd
Expand Down