提交 5735cbb9 编写于 作者: M MRXLT

fix benchmakr

上级 8b6bc100
...@@ -46,7 +46,7 @@ def single_func(idx, resource): ...@@ -46,7 +46,7 @@ def single_func(idx, resource):
start = time.time() start = time.time()
itr = 1000 itr = 1000
for ei in range(itr): for ei in range(itr):
if args.batch_size > 1: if args.batch_size > 0:
feed_batch = [] feed_batch = []
for bi in range(args.batch_size): for bi in range(args.batch_size):
data = reader().next() data = reader().next()
......
rm profile_log rm profile_log
export FLAGS_profile_client=1
export FLAGS_profile_server=1
for thread_num in 1 2 4 8 16 for thread_num in 1 2 4 8 16
do do
for batch_size in 1 2 4 8 16 32 64 128 256 512 for batch_size in 1 4 16 64 256
do do
$PYTHONROOT/bin/python benchmark.py --thread $thread_num --batch_size $batch_size --model serving_client_conf/serving_client_conf.prototxt --request rpc > profile 2>&1 $PYTHONROOT/bin/python benchmark.py --thread $thread_num --batch_size $batch_size --model serving_client_conf/serving_client_conf.prototxt --request rpc > profile 2>&1
echo "batch size : $batch_size"
echo "thread num : $thread_num"
echo "========================================" echo "========================================"
echo "batch size : $batch_size" >> profile_log 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册