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

Commit

Permalink
Fix CD failure due to illegal instruction in OpenBLAS (#18408)
Browse files Browse the repository at this point in the history
* Update to OpenBlas 0.3.10 pre-release

Includes OpenMathLib/OpenBLAS#2527

* Enable support for older architectures in OpenBLAS dynamic architecture feature
  • Loading branch information
leezu authored May 27, 2020
1 parent a02829e commit 382279e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 382279e

Please sign in to comment.