This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch ci_publish
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/ci_publish by this push:
new 5e1a396 openblas build from source script (#12847)
5e1a396 is described below
commit 5e1a396f1ad2bd8956e73e89832a48e1c87cd6e0
Author: Sheng Zha <[email protected]>
AuthorDate: Tue Oct 16 23:28:49 2018 -0700
openblas build from source script (#12847)
---
tools/dependencies/README.md | 11 +++++++++++
tools/dependencies/openblas.sh | 20 ++++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/tools/dependencies/README.md b/tools/dependencies/README.md
new file mode 100644
index 0000000..a9b8692
--- /dev/null
+++ b/tools/dependencies/README.md
@@ -0,0 +1,11 @@
+# Overview
+
+This folder contains scripts for building the dependencies from source. The
static libraries from
+the build artifacts can be used to create self-contained shared object for
mxnet through static
+linking.
+
+# Settings
+
+The scripts use the following environment variables for setting behavior:
+
+`DEPS_PATH`: the location in which the libraries are downloaded, built, and
installed.
diff --git a/tools/dependencies/openblas.sh b/tools/dependencies/openblas.sh
new file mode 100755
index 0000000..6c1fd3e
--- /dev/null
+++ b/tools/dependencies/openblas.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+set -eo pipefail
+
+OPENBLAS_VERSION=0.3.3
+if [[ ! -e $DEPS_PATH/lib/libopenblas.a ]]; then
+ # download and build openblas
+ >&2 echo "Building openblas..."
+
+ curl -s -L
https://github.com/xianyi/OpenBLAS/archive/v$OPENBLAS_VERSION.zip -o
$DEPS_PATH/openblas.zip
+ unzip -q $DEPS_PATH/openblas.zip -d $DEPS_PATH
+ cd $DEPS_PATH/OpenBLAS-$OPENBLAS_VERSION
+
+ $MAKE DYNAMIC_ARCH=1 NO_SHARED=1 USE_OPENMP=1
+ set +e
+ $MAKE PREFIX=$DEPS_PATH install
+ set -e
+ cd -
+ ln -s libopenblas.a $DEPS_PATH/lib/libcblas.a
+ ln -s libopenblas.a $DEPS_PATH/lib/liblapack.a
+fi