Skip to content

Commit c857dbb

Browse files
committed
move util to examples and modify benchmark.sh
1 parent d106e55 commit c857dbb

File tree

13 files changed

+9
-9
lines changed

13 files changed

+9
-9
lines changed

examples/C++/PaddleClas/imagenet/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ do
3838
awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "MAX_GPU_MEMORY:", max}' gpu_use.log >> profile_log_$1
3939
awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "GPU_UTILIZATION:", max}' gpu_utilization.log >> profile_log_$1
4040
rm -rf gpu_use.log gpu_utilization.log
41-
$PYTHONROOT/bin/python ../util/show_profile.py profile $thread_num >> profile_log
41+
$PYTHONROOT/bin/python ../../../util/show_profile.py profile $thread_num >> profile_log
4242
tail -n 8 profile >> profile_log
4343
echo "" >> profile_log_$1
4444
done

examples/C++/PaddleClas/resnet_v2_50/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ do
4646
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
4747
awk -F" " '{sum+=$1} END {print "GPU_UTILIZATION:", sum/NR, sum, NR }' gpu_utilization.log.tmp >> profile_log_$1
4848
rm -rf gpu_memory_use.log gpu_utilization.log gpu_utilization.log.tmp
49-
python3.6 ../util/show_profile.py profile $thread_num >> profile_log_$1
49+
python3.6 ../../../util/show_profile.py profile $thread_num >> profile_log_$1
5050
tail -n 10 profile >> profile_log_$1
5151
echo "" >> profile_log_$1
5252
done

examples/C++/PaddleNLP/bert/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ do
4343
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
4444
awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "GPU_UTILIZATION:", max}' gpu_utilization.log >> profile_log_$1
4545
rm -rf gpu_use.log gpu_utilization.log
46-
$PYTHONROOT/bin/python3 ../util/show_profile.py profile $thread_num >> profile_log_$1
46+
$PYTHONROOT/bin/python3 ../../../util/show_profile.py profile $thread_num >> profile_log_$1
4747
tail -n 8 profile >> profile_log_$1
4848
echo "" >> profile_log_$1
4949
done

examples/C++/PaddleRec/criteo_ctr/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ do
44
$PYTHONROOT/bin/python benchmark.py --thread $thread_num --model ctr_client_conf/serving_client_conf.prototxt --request rpc > profile 2>&1
55
echo "========================================"
66
echo "batch size : $batch_size" >> profile_log
7-
$PYTHONROOT/bin/python ../util/show_profile.py profile $thread_num >> profile_log
7+
$PYTHONROOT/bin/python ../../../util/show_profile.py profile $thread_num >> profile_log
88
tail -n 1 profile >> profile_log
99
done

examples/C++/PaddleRec/criteo_ctr/benchmark_batch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ do
66
$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
77
echo "========================================"
88
echo "batch size : $batch_size" >> profile_log
9-
$PYTHONROOT/bin/python ../util/show_profile.py profile $thread_num >> profile_log
9+
$PYTHONROOT/bin/python ../../../util/show_profile.py profile $thread_num >> profile_log
1010
tail -n 1 profile >> profile_log
1111
done
1212
done

examples/C++/fit_a_line/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ do
4343
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
4444
awk 'BEGIN {max = 0} {if(NR>1){if ($1 > max) max=$1}} END {print "GPU_UTILIZATION:", max}' gpu_utilization.log >> profile_log_$1
4545
rm -rf gpu_use.log gpu_utilization.log
46-
$PYTHONROOT/bin/python3 ../util/show_profile.py profile $thread_num >> profile_log_$1
46+
$PYTHONROOT/bin/python3 ../../util/show_profile.py profile $thread_num >> profile_log_$1
4747
tail -n 8 profile >> profile_log_$1
4848
echo "" >> profile_log_$1
4949
done

examples/C++/imdb/benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ do
3030
echo "model_name:$1" >> profile_log_$1
3131
echo "batch_size:$batch_size" >> profile_log_$1
3232
job_et=`date '+%Y%m%d%H%M%S'`
33-
$PYTHONROOT/bin/python3 ../util/show_profile.py profile $thread_num >> profile_log_$1
33+
$PYTHONROOT/bin/python3 ../../util/show_profile.py profile $thread_num >> profile_log_$1
3434
$PYTHONROOT/bin/python3 cpu_utilization.py >> profile_log_$1
3535
tail -n 8 profile >> profile_log_$1
3636
echo "" >> profile_log_$1

examples/Pipeline/PaddleOCR/ocr/benchmark.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ do
3434
awk -F' ' '{sum+=$1} END {print "GPU_UTILIZATION:", sum/NR, sum, NR }' gpu_utilization.log.tmp >> profile_log_$modelname
3535

3636
# Show profiles
37-
python3 ../../util/show_profile.py profile $thread_num >> profile_log_$modelname
37+
python3 ../../../util/show_profile.py profile $thread_num >> profile_log_$modelname
3838
tail -n 8 profile >> profile_log_$modelname
3939
echo '' >> profile_log_$modelname
4040
done
@@ -78,7 +78,7 @@ do
7878
awk -F" " '{sum+=$1} END {print "GPU_UTILIZATION:", sum/NR, sum, NR }' gpu_utilization.log.tmp >> profile_log_$modelname
7979

8080
# Show profiles
81-
python3 ../../util/show_profile.py profile $thread_num >> profile_log_$modelname
81+
python3 ../../../util/show_profile.py profile $thread_num >> profile_log_$modelname
8282
tail -n 8 profile >> profile_log_$modelname
8383
echo "" >> profile_log_$modelname
8484
done
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)