Skip to content

Commit 2561a6f

Browse files
committed
follow comment. test=develop
1 parent 2a5ecb6 commit 2561a6f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paddle/fluid/framework/details/inplace_op_pass.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ void GraphView::Build(ir::Graph* g) {
401401
}
402402
}
403403

404-
const& std::vector<ir::Node*> GraphView::AllOps() { return ops_; }
404+
const std::vector<ir::Node*>& GraphView::AllOps() { return ops_; }
405405

406406
bool GraphView::ReusedInPythonMemOpt(const std::string& var) const {
407407
return dup_nodes_.count(var);

paddle/fluid/framework/details/inplace_op_pass.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class GraphView {
3333

3434
void Build(ir::Graph* g);
3535

36-
const& std::vector<ir::Node*> AllOps();
36+
const std::vector<ir::Node*>& AllOps();
3737

3838
ir::Node* GetNodeByName(const std::string& name,
3939
const std::vector<ir::Node*>& nodes) const;

0 commit comments

Comments
 (0)