Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
4774dad8
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
4774dad8
编写于
2月 22, 2019
作者:
T
Tao Luo
提交者:
GitHub
2月 22, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15857 from sfraczek/fix-typo
Fix few typos
上级
e3dd6970
1943119f
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
13 addition
and
13 deletion
+13
-13
paddle/fluid/framework/op_proto_maker.h
paddle/fluid/framework/op_proto_maker.h
+1
-1
paddle/fluid/inference/api/analysis_config.cc
paddle/fluid/inference/api/analysis_config.cc
+3
-3
paddle/fluid/inference/api/analysis_predictor.cc
paddle/fluid/inference/api/analysis_predictor.cc
+2
-2
paddle/fluid/inference/api/analysis_predictor.h
paddle/fluid/inference/api/analysis_predictor.h
+1
-1
paddle/fluid/inference/api/analysis_predictor_tester.cc
paddle/fluid/inference/api/analysis_predictor_tester.cc
+2
-2
paddle/fluid/inference/api/api_impl.cc
paddle/fluid/inference/api/api_impl.cc
+1
-1
paddle/fluid/inference/api/paddle_analysis_config.h
paddle/fluid/inference/api/paddle_analysis_config.h
+2
-2
paddle/fluid/inference/api/paddle_api.h
paddle/fluid/inference/api/paddle_api.h
+1
-1
未找到文件。
paddle/fluid/framework/op_proto_maker.h
浏览文件 @
4774dad8
...
...
@@ -27,7 +27,7 @@ enum class OpRole {
kForward
=
0x0000
,
kBackward
=
0x0001
,
kOptimize
=
0x0002
,
// RPC role is for send/recv rel
e
ated op
// RPC role is for send/recv related op
kRPC
=
0x0004
,
// Dist role is for split_byref/split_selected_rows/concat
// used for distributed training.
...
...
paddle/fluid/inference/api/analysis_config.cc
浏览文件 @
4774dad8
...
...
@@ -89,7 +89,7 @@ AnalysisConfig::AnalysisConfig(const AnalysisConfig &other) {
CP_MEMBER
(
params_file_
);
CP_MEMBER
(
model_from_memory_
);
// the memory model reuses prog_file_ and
// params_file_ fields.
// Gpu rel
e
ated.
// Gpu related.
CP_MEMBER
(
use_gpu_
);
CP_MEMBER
(
device_id_
);
CP_MEMBER
(
memory_pool_init_size_mb_
);
...
...
@@ -97,13 +97,13 @@ AnalysisConfig::AnalysisConfig(const AnalysisConfig &other) {
CP_MEMBER
(
enable_memory_optim_
);
CP_MEMBER
(
static_memory_optim_
);
CP_MEMBER
(
static_memory_optim_force_update_
);
// TensorRT rel
e
ated.
// TensorRT related.
CP_MEMBER
(
use_tensorrt_
);
CP_MEMBER
(
tensorrt_workspace_size_
);
CP_MEMBER
(
tensorrt_max_batchsize_
);
CP_MEMBER
(
tensorrt_min_subgraph_size_
);
CP_MEMBER
(
tensorrt_precision_mode_
);
// MKLDNN rel
e
ated.
// MKLDNN related.
CP_MEMBER
(
use_mkldnn_
);
CP_MEMBER
(
mkldnn_enabled_op_types_
);
...
...
paddle/fluid/inference/api/analysis_predictor.cc
浏览文件 @
4774dad8
...
...
@@ -392,7 +392,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
AnalysisConfig
,
PaddleEngineKind
::
kAnalysis
>
(
const
AnalysisConfig
&
config
)
{
VLOG
(
3
)
<<
"create AnalysisConfig"
;
if
(
config
.
use_gpu
())
{
// 1. GPU mem
ero
y
// 1. GPU mem
or
y
PADDLE_ENFORCE_GT
(
config
.
memory_pool_init_size_mb
(),
0.
f
);
PADDLE_ENFORCE_GE
(
config
.
gpu_device_id
(),
0
,
"Invalid device id %d"
,
config
.
gpu_device_id
());
...
...
@@ -726,7 +726,7 @@ bool AnalysisPredictor::need_collect_var_shapes_for_memory_optim() {
return
need
;
}
std
::
string
AnalysisPredictor
::
GetSeria
z
lizedProgram
()
const
{
std
::
string
AnalysisPredictor
::
GetSerializedProgram
()
const
{
return
inference_program_
->
Proto
()
->
SerializeAsString
();
}
...
...
paddle/fluid/inference/api/analysis_predictor.h
浏览文件 @
4774dad8
...
...
@@ -74,7 +74,7 @@ class AnalysisPredictor : public PaddlePredictor {
void
SetMkldnnThreadID
(
int
tid
);
std
::
string
GetSeria
z
lizedProgram
()
const
override
;
std
::
string
GetSerializedProgram
()
const
override
;
protected:
// For memory optimization.
...
...
paddle/fluid/inference/api/analysis_predictor_tester.cc
浏览文件 @
4774dad8
...
...
@@ -214,8 +214,8 @@ TEST(AnalysisPredictor, memory_optim) {
{
// The first predictor help to cache the memory optimize strategy.
auto
predictor
=
CreatePaddlePredictor
<
AnalysisConfig
>
(
config
);
LOG
(
INFO
)
<<
"serialized program: "
<<
predictor
->
GetSeria
z
lizedProgram
();
ASSERT_FALSE
(
predictor
->
GetSeria
z
lizedProgram
().
empty
());
LOG
(
INFO
)
<<
"serialized program: "
<<
predictor
->
GetSerializedProgram
();
ASSERT_FALSE
(
predictor
->
GetSerializedProgram
().
empty
());
// Run several times to check the parameters are not reused by mistake.
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
...
...
paddle/fluid/inference/api/api_impl.cc
浏览文件 @
4774dad8
...
...
@@ -290,7 +290,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
NativeConfig
,
PaddleEngineKind
::
kNative
>
(
const
NativeConfig
&
config
)
{
VLOG
(
3
)
<<
"create NativePaddlePredictor"
;
if
(
config
.
use_gpu
)
{
// 1. GPU mem
ero
y
// 1. GPU mem
or
y
PADDLE_ENFORCE_GE
(
config
.
fraction_of_gpu_memory
,
0.
f
,
"fraction_of_gpu_memory in the config should be set to range (0., 1.]"
);
...
...
paddle/fluid/inference/api/paddle_analysis_config.h
浏览文件 @
4774dad8
...
...
@@ -212,12 +212,12 @@ struct AnalysisConfig {
std
::
string
prog_file_
;
std
::
string
params_file_
;
// GPU rel
e
ated.
// GPU related.
bool
use_gpu_
{
false
};
int
device_id_
{
0
};
uint64_t
memory_pool_init_size_mb_
{
100
};
// initial size is 100MB.
// TensorRT rel
e
ated.
// TensorRT related.
bool
use_tensorrt_
{
false
};
// For workspace_size, refer it from here:
// https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#troubleshooting
...
...
paddle/fluid/inference/api/paddle_api.h
浏览文件 @
4774dad8
...
...
@@ -248,7 +248,7 @@ class PaddlePredictor {
/** \brief Get the serialized model program that executes in inference phase.
* Its data type is ProgramDesc, which is a protobuf message.
*/
virtual
std
::
string
GetSeria
z
lizedProgram
()
const
{
virtual
std
::
string
GetSerializedProgram
()
const
{
assert
(
false
);
// Force raise error.
return
"NotImplemented"
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录