-
Notifications
You must be signed in to change notification settings - Fork 58
/
.gitlab-ci.yml
54 lines (51 loc) · 2.67 KB
/
.gitlab-ci.yml
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
52
53
54
stages:
- cpplint
- pycodestyle
- benchmark
cpplint:
stage: cpplint
script:
- cpplint --linelength=80 --counting=detailed $(find aibench -name "*.h" -or -name "*.cc")
pycodestyle:
stage: pycodestyle
script:
- pycodestyle $(find aibench/python -name "*.py")
benchmark:
stage: benchmark
script:
- set -x
- pwd
- ifconfig
- DATE_STR=`date "+%Y_%m_%d"`
- CI_PROJECT_OUTPUT_PATH=/mace-build-output/$CI_PROJECT_NAME/${DATE_STR}_${CI_PIPELINE_ID}
- mkdir -p $CI_PROJECT_OUTPUT_PATH
- ANDROID_NDK_HOME=/opt/android-ndk-r17b/
- DAY_OF_WEEK=`date +%u`
- >
git clone [email protected]:deep-computing/generic-mobile-devices.git;
if [ $DAY_OF_WEEK -lt 6 ]; then
bash tools/benchmark.sh --output_dir=$CI_PROJECT_OUTPUT_PATH --benchmark_option=Precision --target_abis=armeabi-v7a,arm64-v8a,aarch64,armhf --max_time_per_lock=30 --executors=MACE,SNPE --input_dir=http --num_targets=1;
bash tools/benchmark.sh --output_dir=$CI_PROJECT_OUTPUT_PATH --target_abis=armeabi-v7a,arm64-v8a,aarch64,armhf --max_time_per_lock=30 --num_targets=1;
else
bash tools/benchmark.sh --output_dir=$CI_PROJECT_OUTPUT_PATH --benchmark_option=Precision --target_abis=armeabi-v7a,arm64-v8a,aarch64,armhf --max_time_per_lock=30 --executors=MACE,SNPE --input_dir=http --all_devices_at_once;
bash tools/benchmark.sh --output_dir=$CI_PROJECT_OUTPUT_PATH --target_abis=armeabi-v7a,arm64-v8a,aarch64,armhf --max_time_per_lock=30 --all_devices_at_once;
fi
- >
cp $CI_PROJECT_OUTPUT_PATH/*_report.csv .;
echo "------------------------------------------------------------------";
echo "Prepare Time (see FAQ section in README for more explanations)";
echo "------------------------------------------------------------------";
python -c 'import prettytable,sys;print(prettytable.from_csv(sys.stdin));'<prepare_report.csv;
echo "------------------------------------------------------------------";
echo "Run Time Average (See FAQ section in README for more explanations)";
echo "------------------------------------------------------------------";
python -c 'import prettytable,sys;print(prettytable.from_csv(sys.stdin));'<run_report.csv;
echo "------------------------------------------------------------------";
echo "ImageNet Precision (see FAQ section in README for more explanations)";
echo "------------------------------------------------------------------";
python -c 'import prettytable,sys;print(prettytable.from_csv(sys.stdin));'<precision_report.csv;
artifacts:
paths:
- prepare_report.csv
- run_report.csv
- precision_report.csv