diff --git a/examples/C++/PaddleClas/imagenet/benchmark.sh b/examples/C++/PaddleClas/imagenet/benchmark.sh index 99bda3c84b862032a574579d97ef03b59fee0b62..5287337d09550881fcf534df521012ff920d036f 100644 --- a/examples/C++/PaddleClas/imagenet/benchmark.sh +++ b/examples/C++/PaddleClas/imagenet/benchmark.sh @@ -38,7 +38,7 @@ do awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "MAX_GPU_MEMORY:", max}' gpu_use.log >> profile_log_$1 awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "GPU_UTILIZATION:", max}' gpu_utilization.log >> profile_log_$1 rm -rf gpu_use.log gpu_utilization.log - $PYTHONROOT/bin/python ../util/show_profile.py profile $thread_num >> profile_log + $PYTHONROOT/bin/python ../../../util/show_profile.py profile $thread_num >> profile_log tail -n 8 profile >> profile_log echo "" >> profile_log_$1 done diff --git a/examples/C++/PaddleClas/resnet_v2_50/benchmark.sh b/examples/C++/PaddleClas/resnet_v2_50/benchmark.sh index 0f94276f4ad70e27addfadd2fe65b2056f2d30b3..c098f8b1a63a89526d233a4696f4f5a843276364 100644 --- a/examples/C++/PaddleClas/resnet_v2_50/benchmark.sh +++ b/examples/C++/PaddleClas/resnet_v2_50/benchmark.sh @@ -46,7 +46,7 @@ do awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "MAX_GPU_MEMORY:", max}' gpu_memory_use.log >> profile_log_$1 awk -F" " '{sum+=$1} END {print "GPU_UTILIZATION:", sum/NR, sum, NR }' gpu_utilization.log.tmp >> profile_log_$1 rm -rf gpu_memory_use.log gpu_utilization.log gpu_utilization.log.tmp - python3.6 ../util/show_profile.py profile $thread_num >> profile_log_$1 + python3.6 ../../../util/show_profile.py profile $thread_num >> profile_log_$1 tail -n 10 profile >> profile_log_$1 echo "" >> profile_log_$1 done diff --git a/examples/C++/PaddleNLP/bert/benchmark.sh b/examples/C++/PaddleNLP/bert/benchmark.sh index 7e374db3ee5a5bdccdc75dc2884b9dbbfcb60eca..a898ef83253dc3130c9847efd2120c84942cc9a7 100644 --- a/examples/C++/PaddleNLP/bert/benchmark.sh +++ b/examples/C++/PaddleNLP/bert/benchmark.sh @@ -43,7 +43,7 @@ do awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "MAX_GPU_MEMORY:", max}' gpu_memory_use.log >> profile_log_$1 awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "GPU_UTILIZATION:", max}' gpu_utilization.log >> profile_log_$1 rm -rf gpu_use.log gpu_utilization.log - $PYTHONROOT/bin/python3 ../util/show_profile.py profile $thread_num >> profile_log_$1 + $PYTHONROOT/bin/python3 ../../../util/show_profile.py profile $thread_num >> profile_log_$1 tail -n 8 profile >> profile_log_$1 echo "" >> profile_log_$1 done diff --git a/examples/C++/PaddleRec/criteo_ctr/benchmark.sh b/examples/C++/PaddleRec/criteo_ctr/benchmark.sh index cf7bc6b33fede8a8277dbe5533ed646a1ddee5ba..d15fd560f90e808e724e159e7ffb125b9c06b0a7 100644 --- a/examples/C++/PaddleRec/criteo_ctr/benchmark.sh +++ b/examples/C++/PaddleRec/criteo_ctr/benchmark.sh @@ -4,6 +4,6 @@ do $PYTHONROOT/bin/python benchmark.py --thread $thread_num --model ctr_client_conf/serving_client_conf.prototxt --request rpc > profile 2>&1 echo "========================================" echo "batch size : $batch_size" >> profile_log - $PYTHONROOT/bin/python ../util/show_profile.py profile $thread_num >> profile_log + $PYTHONROOT/bin/python ../../../util/show_profile.py profile $thread_num >> profile_log tail -n 1 profile >> profile_log done diff --git a/examples/C++/PaddleRec/criteo_ctr/benchmark_batch.sh b/examples/C++/PaddleRec/criteo_ctr/benchmark_batch.sh index 46ba451d0ade36c24151e260d5c9b3cc3666a548..71ce4764e7e341997934d6b6c608813155b9eb6f 100644 --- a/examples/C++/PaddleRec/criteo_ctr/benchmark_batch.sh +++ b/examples/C++/PaddleRec/criteo_ctr/benchmark_batch.sh @@ -6,7 +6,7 @@ do $PYTHONROOT/bin/python benchmark_batch.py --thread $thread_num --batch_size $batch_size --model serving_client_conf/serving_client_conf.prototxt --request rpc > profile 2>&1 echo "========================================" echo "batch size : $batch_size" >> profile_log - $PYTHONROOT/bin/python ../util/show_profile.py profile $thread_num >> profile_log + $PYTHONROOT/bin/python ../../../util/show_profile.py profile $thread_num >> profile_log tail -n 1 profile >> profile_log done done diff --git a/examples/C++/fit_a_line/benchmark.sh b/examples/C++/fit_a_line/benchmark.sh index 7e374db3ee5a5bdccdc75dc2884b9dbbfcb60eca..7e23f57cd0073fce1969cd7c4eeaf567e73c29af 100644 --- a/examples/C++/fit_a_line/benchmark.sh +++ b/examples/C++/fit_a_line/benchmark.sh @@ -43,7 +43,7 @@ do awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "MAX_GPU_MEMORY:", max}' gpu_memory_use.log >> profile_log_$1 awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "GPU_UTILIZATION:", max}' gpu_utilization.log >> profile_log_$1 rm -rf gpu_use.log gpu_utilization.log - $PYTHONROOT/bin/python3 ../util/show_profile.py profile $thread_num >> profile_log_$1 + $PYTHONROOT/bin/python3 ../../util/show_profile.py profile $thread_num >> profile_log_$1 tail -n 8 profile >> profile_log_$1 echo "" >> profile_log_$1 done diff --git a/examples/C++/imdb/benchmark.sh b/examples/C++/imdb/benchmark.sh index 7db9a1086314047930bee32fe8c695c2b71753bf..33fc5dc836d75fd12f935415a4347c39beecb00a 100644 --- a/examples/C++/imdb/benchmark.sh +++ b/examples/C++/imdb/benchmark.sh @@ -30,7 +30,7 @@ do echo "model_name:$1" >> profile_log_$1 echo "batch_size:$batch_size" >> profile_log_$1 job_et=`date '+%Y%m%d%H%M%S'` - $PYTHONROOT/bin/python3 ../util/show_profile.py profile $thread_num >> profile_log_$1 + $PYTHONROOT/bin/python3 ../../util/show_profile.py profile $thread_num >> profile_log_$1 $PYTHONROOT/bin/python3 cpu_utilization.py >> profile_log_$1 tail -n 8 profile >> profile_log_$1 echo "" >> profile_log_$1 diff --git a/examples/Pipeline/PaddleOCR/ocr/benchmark.sh b/examples/Pipeline/PaddleOCR/ocr/benchmark.sh index e9f3b9ebc8de3cf5909a008e5e205db79542ed41..ae6027f5e552d79f5f6152dcdf9312bcf31e4576 100644 --- a/examples/Pipeline/PaddleOCR/ocr/benchmark.sh +++ b/examples/Pipeline/PaddleOCR/ocr/benchmark.sh @@ -34,7 +34,7 @@ do awk -F' ' '{sum+=$1} END {print "GPU_UTILIZATION:", sum/NR, sum, NR }' gpu_utilization.log.tmp >> profile_log_$modelname # Show profiles - python3 ../../util/show_profile.py profile $thread_num >> profile_log_$modelname + python3 ../../../util/show_profile.py profile $thread_num >> profile_log_$modelname tail -n 8 profile >> profile_log_$modelname echo '' >> profile_log_$modelname done @@ -78,7 +78,7 @@ do awk -F" " '{sum+=$1} END {print "GPU_UTILIZATION:", sum/NR, sum, NR }' gpu_utilization.log.tmp >> profile_log_$modelname # Show profiles - python3 ../../util/show_profile.py profile $thread_num >> profile_log_$modelname + python3 ../../../util/show_profile.py profile $thread_num >> profile_log_$modelname tail -n 8 profile >> profile_log_$modelname echo "" >> profile_log_$modelname done diff --git a/examples/C++/util/README.md b/examples/util/README.md similarity index 100% rename from examples/C++/util/README.md rename to examples/util/README.md diff --git a/examples/C++/util/README_CN.md b/examples/util/README_CN.md similarity index 100% rename from examples/C++/util/README_CN.md rename to examples/util/README_CN.md diff --git a/examples/C++/util/get_acc.py b/examples/util/get_acc.py similarity index 100% rename from examples/C++/util/get_acc.py rename to examples/util/get_acc.py diff --git a/examples/C++/util/show_profile.py b/examples/util/show_profile.py similarity index 100% rename from examples/C++/util/show_profile.py rename to examples/util/show_profile.py diff --git a/examples/C++/util/timeline_trace.py b/examples/util/timeline_trace.py similarity index 100% rename from examples/C++/util/timeline_trace.py rename to examples/util/timeline_trace.py