Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
e506c99c
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e506c99c
编写于
9月 11, 2019
作者:
C
chengduo
提交者:
GitHub
9月 11, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Open fuse broadcast option (#18833)
* fix vlog level and fuse option type test=develop
上级
47f670d5
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
10 addition
and
7 deletion
+10
-7
paddle/fluid/framework/details/broadcast_op_handle.cc
paddle/fluid/framework/details/broadcast_op_handle.cc
+3
-0
paddle/fluid/framework/details/build_strategy.cc
paddle/fluid/framework/details/build_strategy.cc
+5
-5
paddle/fluid/framework/details/build_strategy.h
paddle/fluid/framework/details/build_strategy.h
+1
-1
paddle/fluid/framework/ir/pass_builder.cc
paddle/fluid/framework/ir/pass_builder.cc
+1
-1
未找到文件。
paddle/fluid/framework/details/broadcast_op_handle.cc
浏览文件 @
e506c99c
...
...
@@ -126,6 +126,9 @@ void BroadcastOpHandle::BroadcastOneVar(
&
VariableVisitor
::
GetMutableTensor
(
out_var
));
}
});
for
(
auto
&
p
:
places_
)
{
nccl_ctxs_
->
DevCtx
(
p
)
->
Wait
();
}
#else
PADDLE_THROW
(
"CUDA is not enabled."
);
#endif
...
...
paddle/fluid/framework/details/build_strategy.cc
浏览文件 @
e506c99c
...
...
@@ -278,12 +278,12 @@ ir::Graph *BuildStrategy::Apply(ir::Graph *graph,
#else
const
bool
use_cuda
)
const
{
#endif
VLOG
(
3
)
<<
"apply all passes"
;
VLOG
(
1
)
<<
"apply all passes"
;
// Create a default one if not finalized by user.
CreatePassesFromStrategy
(
false
);
for
(
std
::
shared_ptr
<
ir
::
Pass
>
&
pass
:
pass_builder_
->
AllPasses
())
{
VLOG
(
3
)
<<
"BuildStrategy::Apply pass:"
<<
pass
->
Type
();
VLOG
(
1
)
<<
"BuildStrategy::Apply pass:"
<<
pass
->
Type
();
if
(
IsMultiDevPass
(
pass
->
Type
()))
{
pass
->
Erase
(
kPlaces
);
pass
->
SetNotOwned
<
const
std
::
vector
<
platform
::
Place
>>
(
kPlaces
,
&
places
);
...
...
@@ -349,11 +349,11 @@ ir::Graph *BuildStrategy::Apply(ir::Graph *graph,
continue
;
}
}
VLOG
(
3
)
<<
"Start Apply Pass "
<<
pass
->
Type
();
VLOG
(
1
)
<<
"Start Apply Pass "
<<
pass
->
Type
();
graph
=
pass
->
Apply
(
graph
);
VLOG
(
3
)
<<
"Finish Apply Pass "
<<
pass
->
Type
();
VLOG
(
1
)
<<
"Finish Apply Pass "
<<
pass
->
Type
();
}
VLOG
(
3
)
<<
"All Passes Applied"
;
VLOG
(
1
)
<<
"All Passes Applied"
;
return
graph
;
}
...
...
paddle/fluid/framework/details/build_strategy.h
浏览文件 @
e506c99c
...
...
@@ -98,7 +98,7 @@ struct BuildStrategy {
// faster. Because fusing broadcast OP equals delaying the execution of all
// broadcast Ops, in this case, all nccl streams are used only for reduce
// operations for a period of time.
bool
fuse_broadcast_ops_
{
fals
e
};
bool
fuse_broadcast_ops_
{
tru
e
};
// replace batch_norm with sync_batch_norm.
bool
sync_batch_norm_
{
false
};
...
...
paddle/fluid/framework/ir/pass_builder.cc
浏览文件 @
e506c99c
...
...
@@ -21,7 +21,7 @@ namespace framework {
namespace
ir
{
std
::
shared_ptr
<
Pass
>
PassBuilder
::
AppendPass
(
const
std
::
string
&
pass_type
)
{
VLOG
(
3
)
<<
"Append "
<<
pass_type
;
VLOG
(
1
)
<<
"Append "
<<
pass_type
;
auto
pass
=
ir
::
PassRegistry
::
Instance
().
Get
(
pass_type
);
passes_
.
emplace_back
(
pass
.
release
());
return
passes_
.
back
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录