2 #===============================================================================
3 # Copyright 2016-2018 Intel Corporation
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #===============================================================================
18 MKLURLROOT="https://github.com/intel/mkl-dnn/releases/download/v0.18-rc/"
19 MKLVERSION="2019.0.3.20190125"
22 if [ "$os" = "Linux" ]; then
23 MKLPACKAGE="mklml_lnx_${MKLVERSION}"
24 elif [ "$os" = "Darwin" ]; then
25 MKLPACKAGE="mklml_mac_${MKLVERSION}"
27 echo "Cannot identify operating system. Try downloading package manually."
31 MKLURL=${MKLURLROOT}${MKLPACKAGE}.tgz
32 DST=`dirname $0`/../external
36 if [ ! -e "${DST}/${MKLPACKAGE}/license.txt" ]; then
37 if [ -x "$(command -v curl)" ]; then
38 curl -L -o "${DST}/${MKLPACKAGE}.tgz" "$MKLURL"
39 elif [ -x "$(command -v wget)" ]; then
40 wget -O "${DST}/${MKLPACKAGE}.tgz" "$MKLURL"
42 echo "curl or wget not available"
47 echo "Download from $MKLURL to $DST failed"
51 tar -xzf "$DST/${MKLPACKAGE}.tgz" -C $DST
52 echo "Downloaded and unpacked Intel(R) MKL small libraries to $DST"
54 echo "Intel(R) MKL small libraries are already installed in $DST"