Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
0fb6940c
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0fb6940c
编写于
7月 07, 2021
作者:
T
TeslaZhao
提交者:
GitHub
7月 07, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1292 from HexToString/develop-p
Compatible GPU fields
上级
28e1cb60
7c81963e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
6 deletion
+27
-6
core/predictor/framework/server.cpp
core/predictor/framework/server.cpp
+1
-0
python/paddle_serving_server/serve.py
python/paddle_serving_server/serve.py
+2
-2
python/paddle_serving_server/server.py
python/paddle_serving_server/server.py
+7
-1
python/paddle_serving_server/web_service.py
python/paddle_serving_server/web_service.py
+17
-3
未找到文件。
core/predictor/framework/server.cpp
浏览文件 @
0fb6940c
...
...
@@ -96,6 +96,7 @@ int ServerManager::start_and_wait() {
LOG
(
ERROR
)
<<
"Failed to start Paddle Inference Server"
;
return
-
1
;
}
LOG
(
WARNING
)
<<
"Finsh start C++ PaddleServing."
;
_server
.
RunUntilAskedToQuit
();
ServerManager
::
stop_reloader
();
...
...
python/paddle_serving_server/serve.py
浏览文件 @
0fb6940c
...
...
@@ -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
()
...
...
python/paddle_serving_server/server.py
浏览文件 @
0fb6940c
...
...
@@ -169,7 +169,13 @@ class Server(object):
self
.
device
=
device
def
set_gpuid
(
self
,
gpuid
):
self
.
gpuid
=
gpuid
if
isinstance
(
gpuid
,
int
):
self
.
gpuid
=
str
(
gpuid
)
elif
isinstance
(
gpuid
,
list
):
gpu_list
=
[
str
(
x
)
for
x
in
gpuid
]
self
.
gpuid
=
","
.
join
(
gpu_list
)
else
:
self
.
gpuid
=
gpuid
def
set_op_num
(
self
,
op_num
):
self
.
op_num
=
op_num
...
...
python/paddle_serving_server/web_service.py
浏览文件 @
0fb6940c
...
...
@@ -105,7 +105,13 @@ class WebService(object):
def
set_gpus
(
self
,
gpus
):
print
(
"This API will be deprecated later. Please do not use it"
)
self
.
gpus
=
gpus
if
isinstance
(
gpus
,
int
):
self
.
gpus
=
str
(
gpus
)
elif
isinstance
(
gpus
,
list
):
gpu_list
=
[
str
(
x
)
for
x
in
gpus
]
self
.
gpus
=
","
.
join
(
gpu_list
)
else
:
self
.
gpus
=
gpus
def
default_rpc_service
(
self
,
workdir
,
...
...
@@ -125,7 +131,7 @@ class WebService(object):
device
=
"gpu"
server
=
Server
()
if
gpus
==
-
1
:
if
gpus
==
-
1
or
gpus
==
"-1"
:
if
use_lite
:
device
=
"arm"
else
:
...
...
@@ -234,7 +240,8 @@ class WebService(object):
use_trt
=
False
,
gpu_multi_stream
=
False
,
op_num
=
None
,
op_max_batch
=
None
):
op_max_batch
=
None
,
gpuid
=-
1
):
print
(
"This API will be deprecated later. Please do not use it"
)
self
.
workdir
=
workdir
self
.
port
=
port
...
...
@@ -251,6 +258,13 @@ class WebService(object):
self
.
gpu_multi_stream
=
gpu_multi_stream
self
.
op_num
=
op_num
self
.
op_max_batch
=
op_max_batch
if
isinstance
(
gpuid
,
int
):
self
.
gpus
=
str
(
gpuid
)
elif
isinstance
(
gpuid
,
list
):
gpu_list
=
[
str
(
x
)
for
x
in
gpuid
]
self
.
gpus
=
","
.
join
(
gpu_list
)
else
:
self
.
gpus
=
gpuid
default_port
=
12000
for
i
in
range
(
1000
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录