提交 0948f587 编写于 作者: M Megvii Engine Team

ci(mge): download mkl from ftp

GitOrigin-RevId: c67b808121ac15aafa5c040e329c046ccb2092f6
上级 22be7e11
...@@ -7,12 +7,14 @@ echo "this script only for linux/macos/windows-unix-like-env(MSYS etc) prepare M ...@@ -7,12 +7,14 @@ echo "this script only for linux/macos/windows-unix-like-env(MSYS etc) prepare M
echo "if you build windows for native at cmd.exe, powershell env or Visual Studio GUI," echo "if you build windows for native at cmd.exe, powershell env or Visual Studio GUI,"
echo "u need download MKL package and untar manually" echo "u need download MKL package and untar manually"
echo "refs: https://software.intel.com/content/www/us/en/develop/tools/math-kernel-library/choose-download/windows.html" echo "refs: https://software.intel.com/content/www/us/en/develop/tools/math-kernel-library/choose-download/windows.html"
MKL_VERSION=2019.5
MKL_PATCH=281
CONDA_BASE_URL=https://anaconda.org/intel
OS=$(uname -s) OS=$(uname -s)
FILE_PREFIX=null
TAR=tar TAR=tar
if [[ -z ${MKL_VERSION} ]];then
MKL_VERSION=2019.5
MKL_PATCH=281
fi
if [ $OS = "Darwin" ];then if [ $OS = "Darwin" ];then
FILE_PREFIX=osx FILE_PREFIX=osx
elif [ $OS = "Linux" ];then elif [ $OS = "Linux" ];then
...@@ -31,11 +33,16 @@ echo "config FILE_PREFIX to: $FILE_PREFIX" ...@@ -31,11 +33,16 @@ echo "config FILE_PREFIX to: $FILE_PREFIX"
rm -rf mkl rm -rf mkl
if [[ -z ${ALREADY_INSTALL_MKL} ]] if [[ -z ${FTP_URL_PREFIX} ]];then
then DOWNLOAD_FILE='${package}-${MKL_VERSION}-intel_${MKL_PATCH}.tar.bz2'
echo "init mkl from software.intel.com" URL='https://anaconda.org/intel/${package}/${MKL_VERSION}/download/$FILE_PREFIX-${platform}/'${DOWNLOAD_FILE}
for platform in 32 64 else
do DOWNLOAD_FILE='${package}.tar.bz2'
URL='$FTP_URL_PREFIX/$FILE_PREFIX-${platform}-'${DOWNLOAD_FILE}
fi
for platform in 32 64
do
if [ $OS = "Darwin" ]&&[ $platform = 32 ];then if [ $OS = "Darwin" ]&&[ $platform = 32 ];then
echo "strip 32 bit file for Darwin" echo "strip 32 bit file for Darwin"
continue continue
...@@ -43,12 +50,9 @@ then ...@@ -43,12 +50,9 @@ then
mkdir -p mkl/x86_${platform} mkdir -p mkl/x86_${platform}
for package in "mkl-include" "mkl-static" for package in "mkl-include" "mkl-static"
do do
DOWNLOAD_FILE=${package}-${MKL_VERSION}-intel_${MKL_PATCH}.tar.bz2 echo "Installing $(eval echo $DOWNLOAD_FILE) for x86_${platform}..."
echo "Installing ${DOWNLOAD_FILE} for x86_${platform}..." echo "try download mkl package from: $(eval echo $URL)"
URL=${CONDA_BASE_URL}/${package}/${MKL_VERSION}/download/$FILE_PREFIX-${platform}/${DOWNLOAD_FILE} wget -q --show-progress "$(eval echo $URL)" -O mkl/x86_${platform}/"$(eval echo $DOWNLOAD_FILE)"
echo "try download mkl package from: ${URL}" $TAR xvj -C mkl/x86_${platform} -f mkl/x86_${platform}/"$(eval echo $DOWNLOAD_FILE)"
wget -q --show-progress "${URL}" -O mkl/x86_${platform}/${DOWNLOAD_FILE}
$TAR xvj -C mkl/x86_${platform} -f mkl/x86_${platform}/${DOWNLOAD_FILE}
done done
done done
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册