Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
72c7fe51
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看板
提交
72c7fe51
编写于
1月 19, 2022
作者:
F
felixhjh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix op init error, server doesn't quit
上级
daf7f568
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
18 addition
and
6 deletion
+18
-6
python/pipeline/operator.py
python/pipeline/operator.py
+18
-6
未找到文件。
python/pipeline/operator.py
浏览文件 @
72c7fe51
...
@@ -1281,6 +1281,7 @@ class Op(object):
...
@@ -1281,6 +1281,7 @@ class Op(object):
return
parsed_data_dict
,
need_profile_dict
,
profile_dict
,
logid_dict
return
parsed_data_dict
,
need_profile_dict
,
profile_dict
,
logid_dict
@
ErrorCatch
def
_run
(
self
,
concurrency_idx
,
input_channel
,
output_channels
,
def
_run
(
self
,
concurrency_idx
,
input_channel
,
output_channels
,
is_thread_op
,
trace_buffer
,
model_config
,
workdir
,
thread_num
,
is_thread_op
,
trace_buffer
,
model_config
,
workdir
,
thread_num
,
device_type
,
devices
,
mem_optim
,
ir_optim
,
precision
,
use_mkldnn
,
device_type
,
devices
,
mem_optim
,
ir_optim
,
precision
,
use_mkldnn
,
...
@@ -1322,7 +1323,12 @@ class Op(object):
...
@@ -1322,7 +1323,12 @@ class Op(object):
# init ops
# init ops
profiler
=
None
profiler
=
None
try
:
@
ErrorCatch
def
check_helper
(
self
,
is_thread_op
,
model_config
,
workdir
,
thread_num
,
device_type
,
devices
,
mem_optim
,
ir_optim
,
precision
,
use_mkldnn
,
mkldnn_cache_capacity
,
mkldnn_op_list
,
mkldnn_bf16_op_list
,
min_subgraph_size
,
dynamic_shape_info
):
if
is_thread_op
==
False
and
self
.
client_type
==
"local_predictor"
:
if
is_thread_op
==
False
and
self
.
client_type
==
"local_predictor"
:
self
.
service_handler
=
local_service_handler
.
LocalServiceHandler
(
self
.
service_handler
=
local_service_handler
.
LocalServiceHandler
(
model_config
=
model_config
,
model_config
=
model_config
,
...
@@ -1348,11 +1354,17 @@ class Op(object):
...
@@ -1348,11 +1354,17 @@ class Op(object):
# check all ops initialized successfully.
# check all ops initialized successfully.
profiler
=
self
.
_initialize
(
is_thread_op
,
concurrency_idx
)
profiler
=
self
.
_initialize
(
is_thread_op
,
concurrency_idx
)
except
Exception
as
e
:
_
,
resp
=
check_helper
(
self
,
is_thread_op
,
model_config
,
workdir
,
_LOGGER
.
critical
(
thread_num
,
device_type
,
devices
,
mem_optim
,
ir_optim
,
"{} failed to init op: {}"
.
format
(
op_info_prefix
,
e
),
precision
,
use_mkldnn
,
mkldnn_cache_capacity
,
mkldnn_op_list
,
exc_info
=
True
)
mkldnn_bf16_op_list
,
min_subgraph_size
,
dynamic_shape_info
)
os
.
_exit
(
-
1
)
if
resp
.
err_no
!=
CustomExceptionCode
.
OK
.
value
:
raise
CustomException
(
CustomExceptionCode
.
INIT_ERROR
,
"{} failed to init op: {}"
.
format
(
op_info_prefix
,
resp
.
err_msg
),
False
)
_LOGGER
.
info
(
"{} Succ init"
.
format
(
op_info_prefix
))
_LOGGER
.
info
(
"{} Succ init"
.
format
(
op_info_prefix
))
batch_generator
=
self
.
_auto_batching_generator
(
batch_generator
=
self
.
_auto_batching_generator
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录