Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
13173ea6
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看板
提交
13173ea6
编写于
2月 18, 2020
作者:
G
guru4elephant
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unnecessary comments
上级
4e6438aa
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
25 deletion
+1
-25
core/general-server/op/general_infer_op.cpp
core/general-server/op/general_infer_op.cpp
+1
-4
core/general-server/op/general_reader_op.cpp
core/general-server/op/general_reader_op.cpp
+0
-4
core/general-server/op/general_response_op.cpp
core/general-server/op/general_response_op.cpp
+0
-6
core/general-server/op/general_text_reader_op.cpp
core/general-server/op/general_text_reader_op.cpp
+0
-5
core/general-server/op/general_text_response_op.cpp
core/general-server/op/general_text_response_op.cpp
+0
-6
未找到文件。
core/general-server/op/general_infer_op.cpp
浏览文件 @
13173ea6
...
...
@@ -52,17 +52,14 @@ int GeneralInferOp::inference() {
int
batch_size
=
input_blob
->
GetBatchSize
();
VLOG
(
2
)
<<
"infer batch size: "
<<
batch_size
;
// infer
Timer
timeline
;
// double infer_time = 0.0;
int64_t
start
=
timeline
.
TimeStampUS
();
timeline
.
Start
();
if
(
InferManager
::
instance
().
infer
(
GENERAL_MODEL_NAME
,
in
,
out
,
batch_size
))
{
LOG
(
ERROR
)
<<
"Failed do infer in fluid model: "
<<
GENERAL_MODEL_NAME
;
return
-
1
;
}
// timeline.Pause();
// infer_time = timeline.ElapsedUS();
int64_t
end
=
timeline
.
TimeStampUS
();
CopyBlobInfo
(
input_blob
,
output_blob
);
AddBlobInfo
(
output_blob
,
start
);
...
...
core/general-server/op/general_reader_op.cpp
浏览文件 @
13173ea6
...
...
@@ -88,12 +88,9 @@ int GeneralReaderOp::inference() {
}
Timer
timeline
;
// double read_time = 0.0;
// timeline.Start();
int64_t
start
=
timeline
.
TimeStampUS
();
int
var_num
=
req
->
insts
(
0
).
tensor_array_size
();
VLOG
(
2
)
<<
"var num: "
<<
var_num
;
// read config
VLOG
(
2
)
<<
"start to call load general model_conf op"
;
baidu
::
paddle_serving
::
predictor
::
Resource
&
resource
=
...
...
@@ -203,7 +200,6 @@ int GeneralReaderOp::inference() {
}
timeline
.
Pause
();
// read_time = timeline.ElapsedUS();
int64_t
end
=
timeline
.
TimeStampUS
();
res
->
p_size
=
0
;
AddBlobInfo
(
res
,
start
);
...
...
core/general-server/op/general_response_op.cpp
浏览文件 @
13173ea6
...
...
@@ -73,11 +73,8 @@ int GeneralResponseOp::inference() {
model_config
->
_fetch_alias_name_to_index
[
req
->
fetch_var_names
(
i
)];
}
// response inst with only fetch_var_names
Response
*
res
=
mutable_data
<
Response
>
();
// res->set_mean_infer_us(infer_time);
for
(
int
i
=
0
;
i
<
batch_size
;
++
i
)
{
FetchInst
*
fetch_inst
=
res
->
add_insts
();
for
(
auto
&
idx
:
fetch_index
)
{
...
...
@@ -124,9 +121,6 @@ int GeneralResponseOp::inference() {
var_idx
++
;
}
// timeline.Pause();
// response_time = timeline.ElapsedUS();
if
(
req
->
profile_server
())
{
int64_t
end
=
timeline
.
TimeStampUS
();
VLOG
(
2
)
<<
"p size for input blob: "
<<
input_blob
->
p_size
;
...
...
core/general-server/op/general_text_reader_op.cpp
浏览文件 @
13173ea6
...
...
@@ -57,13 +57,10 @@ int GeneralTextReaderOp::inference() {
}
Timer
timeline
;
// double read_time = 0.0;
// timeline.Start();
int64_t
start
=
timeline
.
TimeStampUS
();
int
var_num
=
req
->
insts
(
0
).
tensor_array_size
();
VLOG
(
2
)
<<
"var num: "
<<
var_num
;
// read config
VLOG
(
2
)
<<
"start to call load general model_conf op"
;
baidu
::
paddle_serving
::
predictor
::
Resource
&
resource
=
...
...
@@ -164,8 +161,6 @@ int GeneralTextReaderOp::inference() {
}
}
// timeline.Pause();
// read_time = timeline.ElapsedUS();
int64_t
end
=
timeline
.
TimeStampUS
();
AddBlobInfo
(
res
,
start
);
AddBlobInfo
(
res
,
end
);
...
...
core/general-server/op/general_text_response_op.cpp
浏览文件 @
13173ea6
...
...
@@ -49,13 +49,9 @@ int GeneralTextResponseOp::inference() {
int
batch_size
=
input_blob
->
GetBatchSize
();
VLOG
(
2
)
<<
"infer batch size: "
<<
batch_size
;
// infer
const
Request
*
req
=
dynamic_cast
<
const
Request
*>
(
get_request_message
());
Timer
timeline
;
// double response_time = 0.0;
// timeline.Start();
int64_t
start
=
timeline
.
TimeStampUS
();
VLOG
(
2
)
<<
"start to call load general model_conf op"
;
...
...
@@ -76,8 +72,6 @@ int GeneralTextResponseOp::inference() {
// response inst with only fetch_var_names
Response
*
res
=
mutable_data
<
Response
>
();
// res->set_mean_infer_us(infer_time);
for
(
int
i
=
0
;
i
<
batch_size
;
++
i
)
{
FetchInst
*
fetch_inst
=
res
->
add_insts
();
for
(
auto
&
idx
:
fetch_index
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录