提交 a63a3947 编写于 作者: M MRXLT

fix bert benchmark script

上级 89070304
...@@ -53,7 +53,7 @@ def single_func(idx, resource): ...@@ -53,7 +53,7 @@ def single_func(idx, resource):
feed_batch.append(reader.process(dataset[bi])) feed_batch.append(reader.process(dataset[bi]))
b_end = time.time() b_end = time.time()
if profile_flags: if profile_flags:
print("PROFILE\tpid:{}\tbert+pre_0:{} bert_pre_1:{}".format( print("PROFILE\tpid:{}\tbert_pre_0:{} bert_pre_1:{}".format(
os.getpid(), os.getpid(),
int(round(b_start * 1000000)), int(round(b_start * 1000000)),
int(round(b_end * 1000000)))) int(round(b_end * 1000000))))
...@@ -69,9 +69,7 @@ def single_func(idx, resource): ...@@ -69,9 +69,7 @@ def single_func(idx, resource):
if __name__ == '__main__': if __name__ == '__main__':
multi_thread_runner = MultiThreadRunner() multi_thread_runner = MultiThreadRunner()
endpoint_list = [ endpoint_list = ["127.0.0.1:9292"]
"127.0.0.1:9292", "127.0.0.1:9293", "127.0.0.1:9294", "127.0.0.1:9295"
]
result = multi_thread_runner.run(single_func, args.thread, result = multi_thread_runner.run(single_func, args.thread,
{"endpoint": endpoint_list}) {"endpoint": endpoint_list})
avg_cost = 0 avg_cost = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册