Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
8291b916
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
694
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8291b916
编写于
6月 07, 2018
作者:
C
chengduoZH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
replace graph_builder_factory with ssa_graph_builder_factory
上级
9ac785be
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
9 addition
and
8 deletion
+9
-8
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+1
-1
paddle/fluid/framework/details/CMakeLists.txt
paddle/fluid/framework/details/CMakeLists.txt
+1
-1
paddle/fluid/framework/details/multi_devices_graph_builder.cc
...le/fluid/framework/details/multi_devices_graph_builder.cc
+1
-0
paddle/fluid/framework/details/ssa_graph_builder.cc
paddle/fluid/framework/details/ssa_graph_builder.cc
+2
-2
paddle/fluid/framework/details/ssa_graph_builder.h
paddle/fluid/framework/details/ssa_graph_builder.h
+1
-1
paddle/fluid/framework/details/ssa_graph_builder_factory.cc
paddle/fluid/framework/details/ssa_graph_builder_factory.cc
+1
-1
paddle/fluid/framework/details/ssa_graph_builder_factory.h
paddle/fluid/framework/details/ssa_graph_builder_factory.h
+0
-0
paddle/fluid/framework/parallel_executor.cc
paddle/fluid/framework/parallel_executor.cc
+2
-2
未找到文件。
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
8291b916
...
...
@@ -87,7 +87,7 @@ cc_library(executor SRCS executor.cc DEPS op_registry device_context scope
framework_proto glog lod_rank_table feed_fetch_method
)
cc_library
(
parallel_executor SRCS parallel_executor.cc DEPS graph_builder_factory threaded_ssa_graph_executor scope_buffered_ssa_graph_executor
)
cc_library
(
parallel_executor SRCS parallel_executor.cc DEPS
ssa_
graph_builder_factory threaded_ssa_graph_executor scope_buffered_ssa_graph_executor
)
cc_library
(
prune SRCS prune.cc DEPS framework_proto
)
cc_test
(
prune_test SRCS prune_test.cc DEPS op_info prune recurrent_op device_context
)
...
...
paddle/fluid/framework/details/CMakeLists.txt
浏览文件 @
8291b916
...
...
@@ -30,7 +30,7 @@ cc_library(multi_devices_graph_builder SRCS multi_devices_graph_builder.cc DEPS
scale_loss_grad_op_handle rpc_op_handle
${
multi_devices_graph_builder_deps
}
reduce_op_handle broadcast_op_handle
)
cc_library
(
graph_builder_factory SRCS
graph_builder_factory.cc DEPS multi_devices_graph_builder ssa_graph_printer
)
cc_library
(
ssa_graph_builder_factory SRCS ssa_
graph_builder_factory.cc DEPS multi_devices_graph_builder ssa_graph_printer
)
cc_library
(
ssa_graph_executor SRCS ssa_graph_executor.cc DEPS ssa_graph framework_proto
)
cc_library
(
threaded_ssa_graph_executor SRCS threaded_ssa_graph_executor.cc DEPS fetch_op_handle ssa_graph_executor scope
...
...
paddle/fluid/framework/details/multi_devices_graph_builder.cc
浏览文件 @
8291b916
...
...
@@ -272,6 +272,7 @@ std::unique_ptr<SSAGraph> MultiDevSSAGraphBuilder::Build(
* Only variables should be the leaves of graph.
*/
AddOutputToLeafOps
(
&
result
);
return
std
::
unique_ptr
<
SSAGraph
>
(
graph
);
}
...
...
paddle/fluid/framework/details/ssa_graph_builder.cc
浏览文件 @
8291b916
...
...
@@ -85,7 +85,7 @@ void SSAGraphBuilder::AddOutputToLeafOps(SSAGraph *graph) {
}
std
::
unique_ptr
<
SSAGraph
>
SSAGraphBuilder
::
BuildAndCheck
(
const
ProgramDesc
&
program
)
final
{
const
ProgramDesc
&
program
)
{
std
::
unique_ptr
<
SSAGraph
>
graph
=
Build
(
program
);
PADDLE_ENFORCE
(
IsValidGraph
(
graph
.
get
()));
return
std
::
move
(
graph
);
...
...
@@ -138,7 +138,7 @@ bool SSAGraphBuilder::IsValidGraph(const SSAGraph *graph) const {
if
(
ready_vars
.
empty
())
{
return
false
;
}
for
(
auto
ready_var
:
ready_vars
.
)
{
for
(
auto
ready_var
:
ready_vars
)
{
pending_vars
.
erase
(
ready_var
);
for
(
auto
*
op
:
ready_var
->
pending_ops_
)
{
auto
&
deps
=
--
pending_ops
[
op
];
...
...
paddle/fluid/framework/details/ssa_graph_builder.h
浏览文件 @
8291b916
...
...
@@ -31,7 +31,7 @@ class SSAGraphBuilder {
virtual
~
SSAGraphBuilder
()
{}
virtual
std
::
unique_ptr
<
SSAGraph
>
Build
(
const
ProgramDesc
&
program
)
const
=
0
;
std
::
unique_ptr
<
SSAGraph
>
BuildAndCheck
(
const
ProgramDesc
&
program
)
final
;
std
::
unique_ptr
<
SSAGraph
>
BuildAndCheck
(
const
ProgramDesc
&
program
);
DISABLE_COPY_AND_ASSIGN
(
SSAGraphBuilder
);
...
...
paddle/fluid/framework/details/graph_builder_factory.cc
→
paddle/fluid/framework/details/
ssa_
graph_builder_factory.cc
浏览文件 @
8291b916
...
...
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "paddle/fluid/framework/details/graph_builder_factory.h"
#include "paddle/fluid/framework/details/
ssa_
graph_builder_factory.h"
#include <fstream>
#include "paddle/fluid/framework/details/multi_devices_graph_builder.h"
#include "paddle/fluid/framework/details/ssa_graph_printer.h"
...
...
paddle/fluid/framework/details/graph_builder_factory.h
→
paddle/fluid/framework/details/
ssa_
graph_builder_factory.h
浏览文件 @
8291b916
文件已移动
paddle/fluid/framework/parallel_executor.cc
浏览文件 @
8291b916
...
...
@@ -22,8 +22,8 @@ limitations under the License. */
#include "paddle/fluid/platform/nccl_helper.h"
#endif
#include "paddle/fluid/framework/details/graph_builder_factory.h"
#include "paddle/fluid/framework/details/scope_buffered_ssa_graph_executor.h"
#include "paddle/fluid/framework/details/ssa_graph_builder_factory.h"
#include "paddle/fluid/framework/details/threaded_ssa_graph_executor.h"
#include "paddle/fluid/platform/profiler.h"
...
...
@@ -114,7 +114,7 @@ ParallelExecutor::ParallelExecutor(
member_
->
executor_
.
reset
(
new
details
::
ThreadedSSAGraphExecutor
(
exec_strategy
,
member_
->
local_scopes_
,
places
,
builder_factory
.
Create
()
->
Build
(
main_program
)));
builder_factory
.
Create
()
->
Build
AndCheck
(
main_program
)));
member_
->
executor_
.
reset
(
new
details
::
ScopeBufferedSSAGraphExecutor
(
exec_strategy
,
member_
->
local_scopes_
,
std
::
move
(
var_infos
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录