Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
dec89bd7
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
dec89bd7
编写于
1月 24, 2019
作者:
Z
Zeng Jinle
提交者:
GitHub
1月 24, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15460 from sneaxiy/try_to_turn_on_remove_unnecessary_lock
Turn on remove_unnecessary_lock by default
上级
bf91d11e
ef788603
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
3 addition
and
3 deletion
+3
-3
paddle/fluid/framework/details/build_strategy.h
paddle/fluid/framework/details/build_strategy.h
+1
-1
paddle/fluid/pybind/pybind.cc
paddle/fluid/pybind/pybind.cc
+1
-1
python/paddle/fluid/tests/unittests/test_dist_base.py
python/paddle/fluid/tests/unittests/test_dist_base.py
+1
-1
未找到文件。
paddle/fluid/framework/details/build_strategy.h
浏览文件 @
dec89bd7
...
@@ -91,7 +91,7 @@ struct BuildStrategy {
...
@@ -91,7 +91,7 @@ struct BuildStrategy {
int
num_trainers_
{
1
};
int
num_trainers_
{
1
};
int
trainer_id_
{
0
};
int
trainer_id_
{
0
};
std
::
vector
<
std
::
string
>
trainers_endpoints_
;
std
::
vector
<
std
::
string
>
trainers_endpoints_
;
bool
remove_unnecessary_lock_
{
fals
e
};
bool
remove_unnecessary_lock_
{
tru
e
};
// NOTE:
// NOTE:
// Before you add new options, think if it's a general strategy that works
// Before you add new options, think if it's a general strategy that works
...
...
paddle/fluid/pybind/pybind.cc
浏览文件 @
dec89bd7
...
@@ -1021,7 +1021,7 @@ All parameter, weight, gradient are variables in Paddle.
...
@@ -1021,7 +1021,7 @@ All parameter, weight, gradient are variables in Paddle.
PADDLE_ENFORCE
(
!
self
.
IsFinalized
(),
"BuildStrategy is finlaized."
);
PADDLE_ENFORCE
(
!
self
.
IsFinalized
(),
"BuildStrategy is finlaized."
);
self
.
remove_unnecessary_lock_
=
b
;
self
.
remove_unnecessary_lock_
=
b
;
},
},
R"DOC(The type is BOOL. If set True, some locks in GPU ops would be released and ParallelExecutor would run faster. Default
Fals
e.)DOC"
)
R"DOC(The type is BOOL. If set True, some locks in GPU ops would be released and ParallelExecutor would run faster. Default
Tru
e.)DOC"
)
.
def_property
(
.
def_property
(
"num_trainers"
,
"num_trainers"
,
[](
const
BuildStrategy
&
self
)
{
return
self
.
num_trainers_
;
},
[](
const
BuildStrategy
&
self
)
{
return
self
.
num_trainers_
;
},
...
...
python/paddle/fluid/tests/unittests/test_dist_base.py
浏览文件 @
dec89bd7
...
@@ -124,7 +124,7 @@ class TestDistRunnerBase(object):
...
@@ -124,7 +124,7 @@ class TestDistRunnerBase(object):
if
args
.
batch_merge_repeat
>
1
:
if
args
.
batch_merge_repeat
>
1
:
pass_builder
=
build_stra
.
_finalize_strategy_and_create_passes
()
pass_builder
=
build_stra
.
_finalize_strategy_and_create_passes
()
mypass
=
pass_builder
.
insert_pass
(
mypass
=
pass_builder
.
insert_pass
(
len
(
pass_builder
.
all_passes
())
-
2
,
"multi_batch_merge_pass"
)
len
(
pass_builder
.
all_passes
())
-
3
,
"multi_batch_merge_pass"
)
mypass
.
set
(
"num_repeats"
,
args
.
batch_merge_repeat
)
mypass
.
set
(
"num_repeats"
,
args
.
batch_merge_repeat
)
if
args
.
update_method
==
"nccl2"
:
if
args
.
update_method
==
"nccl2"
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录