[Benchmark]Add Failed Log (#1693)

* avoid mem copy for cpp benchmark

* set CMAKE_BUILD_TYPE to Release

* Add SegmentationDiff

* change pointer to reference

* fixed bug

* cast uint8 to int32

* Add diff compare for OCR

* Add diff compare for OCR

* rm ppocr pipeline

* Add yolov5 diff compare

* Add yolov5 diff compare

* deal with comments

* deal with comments

* fixed bug

* fixed bug

* fixed thread nums

* Add Failed log

* optimizer x86 pipeline
This commit is contained in:
WJJ1995
2023-03-23 17:42:32 +08:00
committed by GitHub
parent f36f9324de
commit b62912ff9c
2 changed files with 29 additions and 5 deletions

View File

@@ -62,9 +62,9 @@ fi
./benchmark_ppseg --model PP_LiteSeg_B_STDC2_cityscapes_with_argmax_infer --image cityscapes_demo.png --config_path $CONFIG_PATH
./benchmark_ppseg --model FCN_HRNet_W18_cityscapes_with_argmax_infer --image cityscapes_demo.png --config_path $CONFIG_PATH
./benchmark_ppseg --model SegFormer_B0-cityscapes-with-argmax --image cityscapes_demo.png --config_path $CONFIG_PATH
./benchmark_ppseg --model Deeplabv3_ResNet101_OS8_cityscapes_with_argmax_infer --image cityscapes_demo.png --config_path $CONFIG_PATH
./benchmark_ppseg --model Deeplabv3_ResNet101_OS8_cityscapes_with_argmax_infer --image cityscapes_demo.png --warmup 10 --repeat 50 --config_path $CONFIG_PATH
./benchmark_ppseg --model Unet_cityscapes_with_argmax_infer --image cityscapes_demo.png --config_path $CONFIG_PATH
./benchmark_ppseg --model PP_HumanSegV1_Server_with_argmax_infer --image portrait_heng.jpg --config_path $CONFIG_PATH
./benchmark_ppmatting --model PP-Matting-512 --image matting_input.jpg --config_path $CONFIG_PATH
./benchmark_ppmatting --model PPHumanMatting --image matting_input.jpg --config_path $CONFIG_PATH
./benchmark_ppseg --model PP_HumanSegV1_Server_with_argmax_infer --image portrait_heng.jpg --warmup 10 --repeat 50 --config_path $CONFIG_PATH
./benchmark_ppmatting --model PP-Matting-512 --image matting_input.jpg --warmup 10 --repeat 50 --config_path $CONFIG_PATH
./benchmark_ppmatting --model PPHumanMatting --image matting_input.jpg --warmup 10 --repeat 50 --config_path $CONFIG_PATH
./benchmark_ppmatting --model PPModnet_MobileNetV2 --image matting_input.jpg --config_path $CONFIG_PATH

View File

@@ -36,6 +36,14 @@
if (__config_info__["profile_mode"] == "runtime") { \
if (!BENCHMARK_FUNC) { \
std::cerr << "Failed to predict." << std::endl; \
__ss__ << "Runtime(ms): Failed" << std::endl; \
if (__config_info__["collect_memory_info"] == "true") { \
__ss__ << "cpu_rss_mb: Failed" << std::endl; \
__ss__ << "gpu_rss_mb: Failed" << std::endl; \
__ss__ << "gpu_util: Failed" << std::endl; \
} \
fastdeploy::benchmark::ResultManager::SaveBenchmarkResult( \
__ss__.str(), __config_info__["result_path"]); \
return 0; \
} \
double __profile_time__ = MODEL_NAME.GetProfileTime() * 1000; \
@@ -49,6 +57,14 @@
for (int __i__ = 0; __i__ < __warmup__; __i__++) { \
if (!BENCHMARK_FUNC) { \
std::cerr << "Failed to predict." << std::endl; \
__ss__ << "End2End(ms): Failed" << std::endl; \
if (__config_info__["collect_memory_info"] == "true") { \
__ss__ << "cpu_rss_mb: Failed" << std::endl; \
__ss__ << "gpu_rss_mb: Failed" << std::endl; \
__ss__ << "gpu_util: Failed" << std::endl; \
} \
fastdeploy::benchmark::ResultManager::SaveBenchmarkResult( \
__ss__.str(), __config_info__["result_path"]); \
return 0; \
} \
} \
@@ -62,6 +78,14 @@
for (int __i__ = 0; __i__ < __repeat__; __i__++) { \
if (!BENCHMARK_FUNC) { \
std::cerr << "Failed to predict." << std::endl; \
__ss__ << "End2End(ms): Failed" << std::endl; \
if (__config_info__["collect_memory_info"] == "true") { \
__ss__ << "cpu_rss_mb: Failed" << std::endl; \
__ss__ << "gpu_rss_mb: Failed" << std::endl; \
__ss__ << "gpu_util: Failed" << std::endl; \
} \
fastdeploy::benchmark::ResultManager::SaveBenchmarkResult( \
__ss__.str(), __config_info__["result_path"]); \
return 0; \
} \
} \