File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
paddle/fluid/framework/ir Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ using inference::analysis::Dot;
27
27
namespace {
28
28
const char kGraphVizPath [] = " graph_viz_path" ;
29
29
30
- std::string FormatName (const Node* op ) {
31
- if (!op ->Op () ||
32
- !op ->Op ()->HasAttr (OpProtoAndCheckerMaker::OpNamescopeAttrName ())) {
33
- return op ->Name ();
30
+ std::string FormatName (const Node* node ) {
31
+ if (!node-> IsOp () || !node ->Op () ||
32
+ !node ->Op ()->HasAttr (OpProtoAndCheckerMaker::OpNamescopeAttrName ())) {
33
+ return node ->Name ();
34
34
}
35
35
const std::string full_scope = boost::get<std::string>(
36
- op ->Op ()->GetAttr (OpProtoAndCheckerMaker::OpNamescopeAttrName ()));
37
- return string::Sprintf (" %s%s" , full_scope.c_str (), op ->Name ().c_str ());
36
+ node ->Op ()->GetAttr (OpProtoAndCheckerMaker::OpNamescopeAttrName ()));
37
+ return string::Sprintf (" %s%s" , full_scope.c_str (), node ->Name ().c_str ());
38
38
}
39
39
} // namespace
40
40
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Node {
55
55
std::string Name () const { return name_; }
56
56
57
57
VarDesc* Var () {
58
- PADDLE_ENFORCE (type_ == Type:: kVariable );
58
+ PADDLE_ENFORCE (IsVar () );
59
59
return var_desc_.get ();
60
60
}
61
61
You can’t perform that action at this time.
0 commit comments