Improve test_all_tests scripts to run in every mode (FP32, FP16, INT8)
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com> Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
+76
-49
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
rm *rt
|
|
||||||
|
|
||||||
RED='\033[1;31m'
|
RED='\033[1;31m'
|
||||||
GREEN='\033[1;32m'
|
GREEN='\033[1;32m'
|
||||||
|
ORANGE='\033[1;33m'
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
function print_output {
|
function print_output {
|
||||||
@@ -20,68 +20,95 @@ function print_output {
|
|||||||
out_file=results.log
|
out_file=results.log
|
||||||
rm $out_file
|
rm $out_file
|
||||||
|
|
||||||
./test_resnet101_cnet &>> $out_file
|
modes=( 1 ) # only FP32
|
||||||
res_resnet101_cnet=$?
|
# modes=( 1 2 ) # FP32 and FP16
|
||||||
print_output $res_resnet101_cnet test_resnet101_cnet
|
# modes=( 1 2 3 ) # FP32, FP16 and INT8
|
||||||
|
|
||||||
./test_yolo3 &>> $out_file
|
for i in "${modes[@]}"
|
||||||
res_yolo3=$?
|
do
|
||||||
print_output $res_yolo3 test_yolo3
|
rm *rt
|
||||||
|
if [ $i -eq 1 ]
|
||||||
|
then
|
||||||
|
export TKDNN_MODE=FP32
|
||||||
|
echo -e "${ORANGE}Test FP32${NC}"
|
||||||
|
fi
|
||||||
|
if [ $i -eq 2 ]
|
||||||
|
then
|
||||||
|
export TKDNN_MODE=FP16
|
||||||
|
echo -e "${ORANGE}Test FP16${NC}"
|
||||||
|
fi
|
||||||
|
if [ $i -eq 3 ]
|
||||||
|
then
|
||||||
|
export TKDNN_MODE=INT8
|
||||||
|
export TKDNN_CALIB_LABEL_PATH=../demo/COCO_val2017/all_labels.txt
|
||||||
|
export TKDNN_CALIB_IMG_PATH=../demo/COCO_val2017/all_images.txt
|
||||||
|
echo -e "${ORANGE}Test INT8${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
./test_yolo3_flir &>> $out_file
|
./test_resnet101_cnet &>> $out_file
|
||||||
res_yolo3_flir=$?
|
res_resnet101_cnet=$?
|
||||||
print_output $res_yolo3_flir test_yolo3_flir
|
print_output $res_resnet101_cnet test_resnet101_cnet
|
||||||
|
|
||||||
./test_yolo3_512 &>> $out_file
|
./test_yolo3 &>> $out_file
|
||||||
res_yolo3_512=$?
|
res_yolo3=$?
|
||||||
print_output $res_yolo3_512 test_yolo3_512
|
print_output $res_yolo3 test_yolo3
|
||||||
|
|
||||||
./test_yolo3_tiny &>> $out_file
|
./test_yolo3_flir &>> $out_file
|
||||||
res_yolo3_tiny=$?
|
res_yolo3_flir=$?
|
||||||
print_output $res_yolo3_tiny test_yolo3_tiny
|
print_output $res_yolo3_flir test_yolo3_flir
|
||||||
|
|
||||||
./test_csresnext50-panet-spp &>> $out_file
|
./test_yolo3_512 &>> $out_file
|
||||||
res_csresnext50panetspp=$?
|
res_yolo3_512=$?
|
||||||
print_output $res_csresnext50panetspp "test_csresnext50-panet-spp"
|
print_output $res_yolo3_512 test_yolo3_512
|
||||||
|
|
||||||
./test_mobilenetv2ssd &>> $out_file
|
./test_yolo3_tiny &>> $out_file
|
||||||
res_mobilenetv2ssd=$?
|
res_yolo3_tiny=$?
|
||||||
print_output $res_mobilenetv2ssd test_mobilenetv2ssd
|
print_output $res_yolo3_tiny test_yolo3_tiny
|
||||||
|
|
||||||
./test_yolo3_tiny512 &>> $out_file
|
./test_csresnext50-panet-spp &>> $out_file
|
||||||
res_yolo3_tiny512=$?
|
res_csresnext50panetspp=$?
|
||||||
print_output $res_yolo3_tiny512 test_yolo3_tiny512
|
print_output $res_csresnext50panetspp "test_csresnext50-panet-spp"
|
||||||
|
|
||||||
./test_yolo_tiny &>> $out_file
|
./test_mobilenetv2ssd &>> $out_file
|
||||||
res_yolo_tiny=$?
|
res_mobilenetv2ssd=$?
|
||||||
print_output $res_yolo_tiny test_yolo_tiny
|
print_output $res_mobilenetv2ssd test_mobilenetv2ssd
|
||||||
|
|
||||||
./test_mobilenetv2ssd512 &>> $out_file
|
./test_yolo3_tiny512 &>> $out_file
|
||||||
res_mobilenetv2ssd512=$?
|
res_yolo3_tiny512=$?
|
||||||
print_output $res_mobilenetv2ssd512 test_mobilenetv2ssd512
|
print_output $res_yolo3_tiny512 test_yolo3_tiny512
|
||||||
|
|
||||||
./test_mnist &>> $out_file
|
./test_yolo_tiny &>> $out_file
|
||||||
res_mnist=$?
|
res_yolo_tiny=$?
|
||||||
print_output $res_mnist test_mnist
|
print_output $res_yolo_tiny test_yolo_tiny
|
||||||
|
|
||||||
./test_yolo &>> $out_file
|
./test_mobilenetv2ssd512 &>> $out_file
|
||||||
res_yolo=$?
|
res_mobilenetv2ssd512=$?
|
||||||
print_output $res_yolo test_yolo
|
print_output $res_mobilenetv2ssd512 test_mobilenetv2ssd512
|
||||||
|
|
||||||
./test_yolo3_berkeley &>> $out_file
|
./test_mnist &>> $out_file
|
||||||
res_yolo3_berkeley=$?
|
res_mnist=$?
|
||||||
print_output $res_yolo3_berkeley test_yolo3_berkeley
|
print_output $res_mnist test_mnist
|
||||||
|
|
||||||
./test_yolo_voc &>> $out_file
|
./test_yolo &>> $out_file
|
||||||
res_yolo_voc=$?
|
res_yolo=$?
|
||||||
print_output $res_yolo_voc test_yolo_voc
|
print_output $res_yolo test_yolo
|
||||||
|
|
||||||
./test_dla34_cnet &>> $out_file
|
./test_yolo3_berkeley &>> $out_file
|
||||||
res_dla34_cnet=$?
|
res_yolo3_berkeley=$?
|
||||||
print_output $res_dla34_cnet test_dla34_cnet
|
print_output $res_yolo3_berkeley test_yolo3_berkeley
|
||||||
|
|
||||||
./test_yolo3_coco4 &>> $out_file
|
./test_yolo_voc &>> $out_file
|
||||||
res_yolo3_coco4=$?
|
res_yolo_voc=$?
|
||||||
print_output $res_yolo3_coco4 test_yolo3_coco4
|
print_output $res_yolo_voc test_yolo_voc
|
||||||
|
|
||||||
|
./test_dla34_cnet &>> $out_file
|
||||||
|
res_dla34_cnet=$?
|
||||||
|
print_output $res_dla34_cnet test_dla34_cnet
|
||||||
|
|
||||||
|
./test_yolo3_coco4 &>> $out_file
|
||||||
|
res_yolo3_coco4=$?
|
||||||
|
print_output $res_yolo3_coco4 test_yolo3_coco4
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
echo "If errors occured, check logfile $out_file"
|
echo "If errors occured, check logfile $out_file"
|
||||||
|
|||||||
Reference in New Issue
Block a user