From 1fa332ecdab30f3cdaef7374c2be5be2b5b48ab9 Mon Sep 17 00:00:00 2001 From: HexToString <506181616@qq.com> Date: Wed, 7 Jul 2021 08:35:15 +0000 Subject: [PATCH] fix gpu multicard --- python/paddle_serving_server/serve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle_serving_server/serve.py b/python/paddle_serving_server/serve.py index e97da72c..68e1d19b 100755 --- a/python/paddle_serving_server/serve.py +++ b/python/paddle_serving_server/serve.py @@ -199,14 +199,14 @@ def start_gpu_card_model(gpu_mode, port, args): # pylint: disable=doc-string-mi if args.container_id != None: server.set_container_id(args.container_id) + if gpu_mode == True: + server.set_gpuid(args.gpu_ids) server.load_model_config(model) server.prepare_server( workdir=workdir, port=port, device=device, use_encryption_model=args.use_encryption_model) - if gpu_mode == True: - server.set_gpuid(args.gpu_ids) server.run_server() -- GitLab