Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
85ed4928
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看板
提交
85ed4928
编写于
4月 14, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add comment
上级
55c54e06
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
12 addition
and
17 deletion
+12
-17
core/general-client/src/general_model.cpp
core/general-client/src/general_model.cpp
+0
-2
core/predictor/op/op.h
core/predictor/op/op.h
+12
-15
未找到文件。
core/general-client/src/general_model.cpp
浏览文件 @
85ed4928
...
@@ -262,7 +262,6 @@ int PredictorClient::predict(const std::vector<std::vector<float>> &float_feed,
...
@@ -262,7 +262,6 @@ int PredictorClient::predict(const std::vector<std::vector<float>> &float_feed,
<<
"prepro_1:"
<<
preprocess_end
<<
" "
<<
"prepro_1:"
<<
preprocess_end
<<
" "
<<
"client_infer_0:"
<<
client_infer_start
<<
" "
<<
"client_infer_0:"
<<
client_infer_start
<<
" "
<<
"client_infer_1:"
<<
client_infer_end
<<
" "
;
<<
"client_infer_1:"
<<
client_infer_end
<<
" "
;
// TODO(barriery): multi-model profile time
if
(
FLAGS_profile_server
)
{
if
(
FLAGS_profile_server
)
{
int
op_num
=
res
.
profile_time_size
()
/
2
;
int
op_num
=
res
.
profile_time_size
()
/
2
;
for
(
int
i
=
0
;
i
<
op_num
;
++
i
)
{
for
(
int
i
=
0
;
i
<
op_num
;
++
i
)
{
...
@@ -442,7 +441,6 @@ int PredictorClient::batch_predict(
...
@@ -442,7 +441,6 @@ int PredictorClient::batch_predict(
<<
"prepro_1:"
<<
preprocess_end
<<
" "
<<
"prepro_1:"
<<
preprocess_end
<<
" "
<<
"client_infer_0:"
<<
client_infer_start
<<
" "
<<
"client_infer_0:"
<<
client_infer_start
<<
" "
<<
"client_infer_1:"
<<
client_infer_end
<<
" "
;
<<
"client_infer_1:"
<<
client_infer_end
<<
" "
;
// TODO(barriery): multi-model profile time
if
(
FLAGS_profile_server
)
{
if
(
FLAGS_profile_server
)
{
int
op_num
=
res
.
profile_time_size
()
/
2
;
int
op_num
=
res
.
profile_time_size
()
/
2
;
for
(
int
i
=
0
;
i
<
op_num
;
++
i
)
{
for
(
int
i
=
0
;
i
<
op_num
;
++
i
)
{
...
...
core/predictor/op/op.h
浏览文件 @
85ed4928
...
@@ -14,12 +14,13 @@
...
@@ -14,12 +14,13 @@
#pragma once
#pragma once
#include <bvar/bvar.h> // bvar::LatencyRecorder
#include <bvar/bvar.h> // bvar::LatencyRecorder
#include <cstdlib>
#include <string>
#include <string>
#include <vector>
#include "core/predictor/common/inner_common.h"
#include "core/predictor/common/inner_common.h"
#include "core/predictor/framework/channel.h"
#include "core/predictor/framework/channel.h"
#include "core/predictor/framework/op_repository.h"
#include "core/predictor/framework/op_repository.h"
#include "core/predictor/framework/predictor_metric.h" // PredictorMetric
#include "core/predictor/framework/predictor_metric.h" // PredictorMetric
#include <cstdlib>
namespace
baidu
{
namespace
baidu
{
namespace
paddle_serving
{
namespace
paddle_serving
{
...
@@ -133,14 +134,10 @@ class Op {
...
@@ -133,14 +134,10 @@ class Op {
const
std
::
string
&
full_name
()
const
{
return
_full_name
;
}
const
std
::
string
&
full_name
()
const
{
return
_full_name
;
}
// const std::string& pre_name() const { return _pre_node_name; }
const
std
::
vector
<
std
::
string
>&
pre_names
()
const
{
return
_pre_node_names
;
}
const
std
::
vector
<
std
::
string
>&
pre_names
()
const
{
return
_pre_node_names
;
}
void
set_full_name
(
const
std
::
string
full_name
)
{
_full_name
=
full_name
;
}
void
set_full_name
(
const
std
::
string
full_name
)
{
_full_name
=
full_name
;
}
/*void set_pre_node_name(const std::string pre_name) {*/
//_pre_node_name = pre_name;
/*}*/
void
add_pre_node_name
(
const
std
::
string
pre_name
)
{
void
add_pre_node_name
(
const
std
::
string
pre_name
)
{
_pre_node_names
.
push_back
(
pre_name
);
_pre_node_names
.
push_back
(
pre_name
);
}
}
...
@@ -204,8 +201,7 @@ class Op {
...
@@ -204,8 +201,7 @@ class Op {
Bus
*
_bus
;
Bus
*
_bus
;
Dag
*
_dag
;
Dag
*
_dag
;
uint32_t
_id
;
uint32_t
_id
;
// std::string _pre_node_name; // only for sequential execution
std
::
vector
<
std
::
string
>
_pre_node_names
;
// for DAG execution
std
::
vector
<
std
::
string
>
_pre_node_names
;
// for dag execution
std
::
string
_name
;
std
::
string
_name
;
std
::
string
_full_name
;
// service_workflow_stageindex_opname
std
::
string
_full_name
;
// service_workflow_stageindex_opname
std
::
string
_type
;
std
::
string
_type
;
...
@@ -232,8 +228,8 @@ class OpWithChannel : public Op {
...
@@ -232,8 +228,8 @@ class OpWithChannel : public Op {
return
_channel
;
return
_channel
;
}
}
//
TODO: some bug
in using butil::get_object
//
TODO(barriery): There are some problems
in using butil::get_object
//_channel = butil::get_object<ChannelType>();
//
_channel = butil::get_object<ChannelType>();
_channel
=
new
ChannelType
();
_channel
=
new
ChannelType
();
if
(
!
_channel
)
{
if
(
!
_channel
)
{
...
@@ -251,11 +247,12 @@ class OpWithChannel : public Op {
...
@@ -251,11 +247,12 @@ class OpWithChannel : public Op {
_channel
->
deinit
();
_channel
->
deinit
();
delete
_channel
;
delete
_channel
;
}
}
//TODO: some bug in using butil::get_object
// TODO(barriery): There are some problems in using butil::get_object
/*if (_channel) {*/
/*
//_channel->deinit();
if (_channel) {
//butil::return_object<ChannelType>(_channel);
_channel->deinit();
/*}*/
butil::return_object<ChannelType>(_channel);
} */
_channel
=
NULL
;
_channel
=
NULL
;
return
0
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录