blob: 7aeaaf4ec18aeb57ca7f127b1c7f3ddd2f9f9fff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#!/bin/sh
#===============================================================================
# Copyright 2016-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================
MKLURLROOT="https://github.com/intel/mkl-dnn/releases/download/v0.15/"
MKLVERSION="2018.0.3.20180406"
os=`uname`
if [ "$os" = "Linux" ]; then
MKLPACKAGE="mklml_lnx_${MKLVERSION}.tgz"
elif [ "$os" = "Darwin" ]; then
MKLPACKAGE="mklml_mac_${MKLVERSION}.tgz"
else
echo "Cannot identify operating system. Try downloading package manually."
exit 1
fi
MKLURL=${MKLURLROOT}${MKLPACKAGE}
DST=`dirname $0`/../external
mkdir -p $DST
DST=`cd $DST;pwd`
if [ -x "$(command -v curl)" ]; then
curl -L -o "${DST}/${MKLPACKAGE}" "$MKLURL"
elif [ -x "$(command -v wget)" ]; then
wget -O "${DST}/${MKLPACKAGE}" "$MKLURL"
else
echo "curl or wget not available"
exit 1
fi
if [ \! $? ]; then
echo "Download from $MKLURL to $DST failed"
exit 1
fi
tar -xzf "$DST/${MKLPACKAGE}" -C $DST
echo "Downloaded and unpacked Intel(R) MKL small libraries to $DST"
|