diff --git a/scripts/test_all_tests.sh b/scripts/test_all_tests.sh index d663d01..41b2781 100644 --- a/scripts/test_all_tests.sh +++ b/scripts/test_all_tests.sh @@ -32,6 +32,14 @@ function print_output { out_file=results.log rm $out_file +function test_net { + ./test_$1 &>> $out_file + print_output $? $1 + ./test_rtinference $1*.rt $TKDNN_BATCHSIZE &>> $out_file + print_output $? "batched $1" +} + + modes=( 1 ) # only FP32 # modes=( 1 2 ) # FP32 and FP16 # modes=( 1 2 3 ) # FP32, FP16 and INT8 @@ -57,73 +65,28 @@ do echo -e "${ORANGE}Test INT8${NC}" fi + export TKDNN_BATCHSIZE=2 + echo -e "${ORANGE}Batch $TKDNN_BATCHSIZE ${NC}" + ./test_imuodom &>> $out_file - res_imuodom=$? - print_output $res_imuodom test_imuodom + print_output $? imuodom - ./test_resnet101_cnet &>> $out_file - res_resnet101_cnet=$? - print_output $res_resnet101_cnet test_resnet101_cnet - - ./test_yolo3 &>> $out_file - res_yolo3=$? - print_output $res_yolo3 test_yolo3 - - ./test_yolo3_flir &>> $out_file - res_yolo3_flir=$? - print_output $res_yolo3_flir test_yolo3_flir - - ./test_yolo3_512 &>> $out_file - res_yolo3_512=$? - print_output $res_yolo3_512 test_yolo3_512 - - ./test_yolo3_tiny &>> $out_file - res_yolo3_tiny=$? - print_output $res_yolo3_tiny test_yolo3_tiny - - ./test_csresnext50-panet-spp &>> $out_file - res_csresnext50panetspp=$? - print_output $res_csresnext50panetspp "test_csresnext50-panet-spp" - - ./test_mobilenetv2ssd &>> $out_file - res_mobilenetv2ssd=$? - print_output $res_mobilenetv2ssd test_mobilenetv2ssd - - ./test_yolo3_tiny512 &>> $out_file - res_yolo3_tiny512=$? - print_output $res_yolo3_tiny512 test_yolo3_tiny512 - - ./test_yolo_tiny &>> $out_file - res_yolo_tiny=$? - print_output $res_yolo_tiny test_yolo_tiny - - ./test_mobilenetv2ssd512 &>> $out_file - res_mobilenetv2ssd512=$? - print_output $res_mobilenetv2ssd512 test_mobilenetv2ssd512 - - ./test_mnist &>> $out_file - res_mnist=$? - print_output $res_mnist test_mnist - - ./test_yolo &>> $out_file - res_yolo=$? - print_output $res_yolo test_yolo - - ./test_yolo3_berkeley &>> $out_file - res_yolo3_berkeley=$? - print_output $res_yolo3_berkeley test_yolo3_berkeley - - ./test_yolo_voc &>> $out_file - res_yolo_voc=$? - 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 + test_net resnet101_cnet + test_net yolo3 + test_net yolo3_flir + test_net yolo3_512 + test_net yolo3_tiny + test_net csresnext50-panet-spp + test_net mobilenetv2ssd + test_net yolo3_tiny512 + test_net yolo_tiny + test_net mobilenetv2ssd512 + test_net mnist + test_net yolo + test_net yolo3_berkeley + test_net yolo_voc + test_net dla34_cnet + test_net yolo3_coco4 done diff --git a/tests/test_rtinference/rtinference.cpp b/tests/test_rtinference/rtinference.cpp index 95bb20c..2b521ad 100644 --- a/tests/test_rtinference/rtinference.cpp +++ b/tests/test_rtinference/rtinference.cpp @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) { dnnType *out_d = (dnnType*) netRT.buffersRT[o]; dnnType *out0_d = out_d; dnnType *outI_d = out_d + netRT.buffersDIM[o].tot()*b; - ret_tensorrt |= checkResult(netRT.buffersDIM[o].tot(), outI_d, out0_d); + ret_tensorrt |= checkResult(netRT.buffersDIM[o].tot(), outI_d, out0_d) == 0 ? 0 : ERROR_TENSORRT; } } }