blob: 91a75ec847dbeebb363c5118fb75541cd14afaec (
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
|
#!/bin/bash
function AssertZeroExitCode {
EXITCODE=$?
if [ $EXITCODE -ne 0 ]; then
echo "$1"
echo "+++ Command exited with code $EXITCODE. Please fix the above errors and re-run"
exit 1
fi
}
if [ ! -d boost_1_64_0 ]; then
echo "++ Downloading Boost"
BOOST_PKG=boost_1_64_0.tar.gz
curl -LOk https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
AssertZeroExitCode "Downloading Boost failed"
tar xzf $BOOST_PKG
AssertZeroExitCode "Unpacking Boost failed"
rm -rf $BOOST_PKG
fi
if [ ! -d armnn ]; then
echo "++ Downloading armnn"
git clone git@github.com:ARM-software/armnn.git armnn
AssertZeroExitCode "Cloning armnn failed"
fi
if [ ! -d clframework ]; then
echo "++ Downloading clframework"
git clone git@github.com:ARM-software/ComputeLibrary.git clframework
AssertZeroExitCode "Cloning clframework failed"
fi
# Get scons to create the generated source code which clframework needs to compile.
# This is required for the Android build system to build clframework (see below)
pushd clframework
scons os=android build=embed_only neon=0 opencl=1 embed_kernels=1 validation_tests=0 \
arch=arm64-v8a build_dir=android-arm64v8a benchmark_tests=0 -j16 \
build/android-arm64v8a/src/core/arm_compute_version.embed build/android-arm64v8a/src/core/CL/cl_kernels
AssertZeroExitCode "Precompiling clframework failed"
popd
|