szha closed pull request #12847: [CI branch] script for building openblas from source URL: https://github.com/apache/incubator-mxnet/pull/12847
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tools/dependencies/README.md b/tools/dependencies/README.md new file mode 100644 index 00000000000..a9b86924b10 --- /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 00000000000..6c1fd3ee937 --- /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 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
