Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
59c66532
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
提交
59c66532
编写于
11月 08, 2018
作者:
X
Xin Pan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add more logs and comments
test=develop
上级
cb2d33a8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
0 deletion
+13
-0
paddle/fluid/framework/details/op_handle_base.h
paddle/fluid/framework/details/op_handle_base.h
+1
-0
paddle/fluid/framework/details/var_handle.cc
paddle/fluid/framework/details/var_handle.cc
+6
-0
paddle/fluid/framework/details/var_handle.h
paddle/fluid/framework/details/var_handle.h
+5
-0
paddle/fluid/framework/ir/node.h
paddle/fluid/framework/ir/node.h
+1
-0
未找到文件。
paddle/fluid/framework/details/op_handle_base.h
浏览文件 @
59c66532
...
@@ -31,6 +31,7 @@ constexpr char kLocalExecScopeName[] = "@LCOAL_SCOPE@";
...
@@ -31,6 +31,7 @@ constexpr char kLocalExecScopeName[] = "@LCOAL_SCOPE@";
// It's responsible for populating necessary fields of ir::Node.
// It's responsible for populating necessary fields of ir::Node.
class
OpHandleBase
{
class
OpHandleBase
{
public:
public:
// Owned by `node`. No need to be deleted explicitly.
explicit
OpHandleBase
(
ir
::
Node
*
node
)
:
node_
(
node
)
{
explicit
OpHandleBase
(
ir
::
Node
*
node
)
:
node_
(
node
)
{
node_
->
WrappedBy
(
this
);
node_
->
WrappedBy
(
this
);
}
}
...
...
paddle/fluid/framework/details/var_handle.cc
浏览文件 @
59c66532
...
@@ -20,6 +20,8 @@ namespace details {
...
@@ -20,6 +20,8 @@ namespace details {
VarHandleBase
::~
VarHandleBase
()
{}
VarHandleBase
::~
VarHandleBase
()
{}
VarHandle
::~
VarHandle
()
{
VLOG
(
4
)
<<
"deleting var handle "
<<
DebugString
();
}
std
::
string
VarHandle
::
DebugString
()
const
{
std
::
string
VarHandle
::
DebugString
()
const
{
std
::
stringstream
ss
;
std
::
stringstream
ss
;
ss
<<
name_
<<
":"
<<
place_
;
ss
<<
name_
<<
":"
<<
place_
;
...
@@ -27,6 +29,10 @@ std::string VarHandle::DebugString() const {
...
@@ -27,6 +29,10 @@ std::string VarHandle::DebugString() const {
}
}
std
::
string
DummyVarHandle
::
DebugString
()
const
{
return
node_
->
Name
();
}
std
::
string
DummyVarHandle
::
DebugString
()
const
{
return
node_
->
Name
();
}
DummyVarHandle
::~
DummyVarHandle
()
{
VLOG
(
4
)
<<
"deleting dummy var handle "
<<
DebugString
();
}
}
// namespace details
}
// namespace details
}
// namespace framework
}
// namespace framework
}
// namespace paddle
}
// namespace paddle
paddle/fluid/framework/details/var_handle.h
浏览文件 @
59c66532
...
@@ -35,6 +35,7 @@ class OpHandleBase;
...
@@ -35,6 +35,7 @@ class OpHandleBase;
// A variable can only be generated by a single operator. i.e.
// A variable can only be generated by a single operator. i.e.
// This is a single assignment graph.
// This is a single assignment graph.
struct
VarHandleBase
{
struct
VarHandleBase
{
// Owned by `node`. No need to be deleted explicitly.
explicit
VarHandleBase
(
ir
::
Node
*
node
)
:
node_
(
node
)
{
explicit
VarHandleBase
(
ir
::
Node
*
node
)
:
node_
(
node
)
{
node_
->
WrappedBy
(
this
);
node_
->
WrappedBy
(
this
);
}
}
...
@@ -96,6 +97,8 @@ struct VarHandleBase {
...
@@ -96,6 +97,8 @@ struct VarHandleBase {
struct
VarHandle
:
public
VarHandleBase
{
struct
VarHandle
:
public
VarHandleBase
{
explicit
VarHandle
(
ir
::
Node
*
node
)
:
VarHandleBase
(
node
)
{}
explicit
VarHandle
(
ir
::
Node
*
node
)
:
VarHandleBase
(
node
)
{}
virtual
~
VarHandle
();
std
::
string
DebugString
()
const
override
;
std
::
string
DebugString
()
const
override
;
VarHandle
(
ir
::
Node
*
node
,
size_t
version
,
size_t
scope_index
,
VarHandle
(
ir
::
Node
*
node
,
size_t
version
,
size_t
scope_index
,
...
@@ -123,6 +126,8 @@ struct VarHandle : public VarHandleBase {
...
@@ -123,6 +126,8 @@ struct VarHandle : public VarHandleBase {
struct
DummyVarHandle
:
public
VarHandleBase
{
struct
DummyVarHandle
:
public
VarHandleBase
{
explicit
DummyVarHandle
(
ir
::
Node
*
node
)
:
VarHandleBase
(
node
)
{}
explicit
DummyVarHandle
(
ir
::
Node
*
node
)
:
VarHandleBase
(
node
)
{}
virtual
~
DummyVarHandle
();
std
::
string
DebugString
()
const
override
;
std
::
string
DebugString
()
const
override
;
};
};
...
...
paddle/fluid/framework/ir/node.h
浏览文件 @
59c66532
...
@@ -49,6 +49,7 @@ class Node {
...
@@ -49,6 +49,7 @@ class Node {
public:
public:
virtual
~
Node
()
{
virtual
~
Node
()
{
if
(
!
wrapper_
.
empty
())
{
if
(
!
wrapper_
.
empty
())
{
VLOG
(
4
)
<<
"ir::Node deleting a wrapper node "
<<
Name
();
wrapper_deleter_
();
wrapper_deleter_
();
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录