Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
042f3524
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
042f3524
编写于
1月 04, 2018
作者:
T
tensor-tang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add flag use_mkl_packed
上级
89bbc4f6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
0 deletion
+11
-0
paddle/trainer/TrainerConfigHelper.cpp
paddle/trainer/TrainerConfigHelper.cpp
+2
-0
paddle/utils/Flags.cpp
paddle/utils/Flags.cpp
+6
-0
paddle/utils/Flags.h
paddle/utils/Flags.h
+1
-0
python/paddle/v2/__init__.py
python/paddle/v2/__init__.py
+2
-0
未找到文件。
paddle/trainer/TrainerConfigHelper.cpp
浏览文件 @
042f3524
...
@@ -29,6 +29,7 @@ DECLARE_bool(with_gpu);
...
@@ -29,6 +29,7 @@ DECLARE_bool(with_gpu);
DECLARE_bool
(
parallel_nn
);
DECLARE_bool
(
parallel_nn
);
DECLARE_string
(
config_args
);
DECLARE_string
(
config_args
);
DECLARE_bool
(
use_mkldnn
);
DECLARE_bool
(
use_mkldnn
);
DECLARE_bool
(
use_mkl_packed
);
const
char
*
kConfigParserModuleName
=
"paddle.trainer.config_parser"
;
const
char
*
kConfigParserModuleName
=
"paddle.trainer.config_parser"
;
const
char
*
kConfigParserFuncName
=
"parse_config_and_serialize"
;
const
char
*
kConfigParserFuncName
=
"parse_config_and_serialize"
;
...
@@ -46,6 +47,7 @@ TrainerConfigHelper::TrainerConfigHelper(const std::string &configFilePath)
...
@@ -46,6 +47,7 @@ TrainerConfigHelper::TrainerConfigHelper(const std::string &configFilePath)
<<
",with_cost="
<<
FLAGS_with_cost
<<
",use_gpu="
<<
FLAGS_use_gpu
<<
",with_cost="
<<
FLAGS_with_cost
<<
",use_gpu="
<<
FLAGS_use_gpu
<<
",parallel_nn="
<<
FLAGS_parallel_nn
<<
",parallel_nn="
<<
FLAGS_parallel_nn
<<
",use_mkldnn="
<<
FLAGS_use_mkldnn
<<
",use_mkldnn="
<<
FLAGS_use_mkldnn
<<
",use_mkl_packed="
<<
FLAGS_use_mkl_packed
<<
",cudnn_version="
<<
hl_get_cudnn_lib_version
();
<<
",cudnn_version="
<<
hl_get_cudnn_lib_version
();
if
(
!
FLAGS_config_args
.
empty
())
{
if
(
!
FLAGS_config_args
.
empty
())
{
configArgs
<<
","
<<
FLAGS_config_args
;
configArgs
<<
","
<<
FLAGS_config_args
;
...
...
paddle/utils/Flags.cpp
浏览文件 @
042f3524
...
@@ -27,6 +27,12 @@ DEFINE_bool(use_mkldnn, false, "Default still keep use CPU training");
...
@@ -27,6 +27,12 @@ DEFINE_bool(use_mkldnn, false, "Default still keep use CPU training");
DEFINE_bool
(
use_mkldnn
,
false
,
"Only support CPU training"
);
DEFINE_bool
(
use_mkldnn
,
false
,
"Only support CPU training"
);
#endif
#endif
#ifdef PADDLE_WITH_MKLML
DEFINE_bool
(
use_mkl_packed
,
true
,
"Default use MKL Packed Optimization"
);
#else
DEFINE_bool
(
use_mkl_packed
,
false
,
"Whether to use MKL Packed Optimization"
);
#endif
DEFINE_bool
(
parallel_nn
,
DEFINE_bool
(
parallel_nn
,
false
,
false
,
"Whether to use multi-threads to calculate one neural network."
"Whether to use multi-threads to calculate one neural network."
...
...
paddle/utils/Flags.h
浏览文件 @
042f3524
...
@@ -41,3 +41,4 @@ DECLARE_string(predict_file);
...
@@ -41,3 +41,4 @@ DECLARE_string(predict_file);
DECLARE_bool
(
prev_batch_state
);
DECLARE_bool
(
prev_batch_state
);
DECLARE_string
(
init_model_path
);
DECLARE_string
(
init_model_path
);
DECLARE_bool
(
use_mkldnn
);
DECLARE_bool
(
use_mkldnn
);
DECLARE_bool
(
use_mkl_packed
);
python/paddle/v2/__init__.py
浏览文件 @
042f3524
...
@@ -135,6 +135,8 @@ def init(**kwargs):
...
@@ -135,6 +135,8 @@ def init(**kwargs):
cp
.
g_command_config_args
[
'use_gpu'
]
=
kwargs
[
'use_gpu'
]
cp
.
g_command_config_args
[
'use_gpu'
]
=
kwargs
[
'use_gpu'
]
if
'use_mkldnn'
in
kwargs
:
if
'use_mkldnn'
in
kwargs
:
cp
.
g_command_config_args
[
'use_mkldnn'
]
=
kwargs
[
'use_mkldnn'
]
cp
.
g_command_config_args
[
'use_mkldnn'
]
=
kwargs
[
'use_mkldnn'
]
if
'use_mkl_packed'
in
kwargs
:
cp
.
g_command_config_args
[
'use_mkl_packed'
]
=
kwargs
[
'use_mkl_packed'
]
assert
'parallel_nn'
not
in
kwargs
,
(
"currently 'parallel_nn' is not "
assert
'parallel_nn'
not
in
kwargs
,
(
"currently 'parallel_nn' is not "
"supported in v2 APIs."
)
"supported in v2 APIs."
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录