-
Notifications
You must be signed in to change notification settings - Fork 4
/
regression_samples.sh
executable file
·62 lines (52 loc) · 1.3 KB
/
regression_samples.sh
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
55
56
57
58
59
60
61
62
set -ex
echo "tpu samples regression for cv180x platform"
if [ -z "$MODEL_PATH" ] || [ ! -e $MODEL_PATH ]; then
echo "MODEL_PATH $MODEL_PATH does not exist"
echo "Please set MODEL_PATH to cvimodel_regression dir"
exit 1
fi
if [ -z "$TPU_ROOT" ] || [ ! -e $TPU_ROOT ]; then
echo "TPU_ROOT $TPU_ROOT does not exist"
echo "Please set TPU_ROOT to cvitek_tpu_sdk dir"
exit 1
fi
#export TPU_ENABLE_PMU=1
samples_list="run_classifier.sh run_classifier_fused_preprocess.sh"
#"run_classifier_multi_batch.sh"
samples_extra_list=""
#"run_alphapose.sh"
#"run_alphapose_fused_preprocess.sh"
#"run_classifier_yuv420.sh"
#"run_detector_yolov3_fused_preprocess.sh"
#"run_detector_yolov3.sh"
#"run_detector_yolov5_fused_preprocess.sh"
#"run_detector_yolov5.sh"
#"run_detector_yolox_s.sh"
#"run_insightface_fused_preprocess.sh"
function test_sample() {
for sample in $*
do
echo $sample
sh -ex ./$sample
if [ "$?" -ne "0" ]; then
echo "$samples FAILED"
return 1
fi
done
return 0
}
cd $TPU_ROOT/samples
# test samples
test_sample ${samples_list}
if [ $? -ne 0 ]; then
echo "test samples failed !!"
exit 1
fi
cd $TPU_ROOT/samples/samples_extra
# test samples_extra
test_sample ${samples_extra_list}
if [ $? -ne 0 ]; then
echo "test samples failed !!"
exit 1
fi
exit 0