未验证 提交 6bd96f48 编写于 作者: M MRXLT 提交者: GitHub

Merge pull request #407 from MRXLT/0.2.0-fix-gpu-v4

fix cuda check
......@@ -64,4 +64,4 @@ result = multi_thread_runner.run(single_func, args.thread, {})
avg_cost = 0
for cost in result[0]:
avg_cost += cost
print("total cost of each thread".format(avg_cost / args.thread))
print("total cost {} s of each thread".format(avg_cost / args.thread))
......@@ -116,7 +116,7 @@ class Server(object):
self.reload_interval_s = 10
self.module_path = os.path.dirname(paddle_serving_server.__file__)
self.cur_path = os.getcwd()
self.check_cuda
self.check_cuda()
self.use_local_bin = False
self.gpuid = 0
......@@ -144,7 +144,7 @@ class Server(object):
self.bin_path = os.environ["SERVING_BIN"]
def check_cuda(self):
r = os.system("whereis cuda")
r = os.system("nvcc --version > /dev/null")
if r != 0:
raise SystemExit(
"CUDA not found, please check your environment or use cpu version by \"pip install paddle_serving_server\""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册