From f2eed667c0a9e7d483a1bce7e79a54f9aa79ee93 Mon Sep 17 00:00:00 2001 From: sneaxiy Date: Mon, 29 Oct 2018 12:48:32 +0000 Subject: [PATCH] test=develop --- .../fluid/framework/details/sequential_execution_pass.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/framework/details/sequential_execution_pass.cc b/paddle/fluid/framework/details/sequential_execution_pass.cc index 6725cdfb2..649bdb098 100644 --- a/paddle/fluid/framework/details/sequential_execution_pass.cc +++ b/paddle/fluid/framework/details/sequential_execution_pass.cc @@ -16,6 +16,7 @@ #include #include #include +#include "paddle/fluid/framework/op_proto_maker.h" namespace paddle { namespace framework { @@ -28,7 +29,7 @@ static bool IsSameOpDesc(OpDesc *op1, OpDesc *op2) { std::unique_ptr SequentialExecutionPass::ApplyImpl( std::unique_ptr graph) const { - auto ops = this->Get>(kAllOpDescs); + auto &ops = Get>(kAllOpDescs); std::vector op_node_list; op_node_list.reserve(ops.size()); @@ -39,7 +40,6 @@ std::unique_ptr SequentialExecutionPass::ApplyImpl( for (ir::Node *node : graph->Nodes()) { if (!node->IsOp()) continue; std::unordered_set preceding_ops; - pending_ops[node]; for (auto *in : node->inputs) { PADDLE_ENFORCE(in->IsVar(), "Preceding Node of Op Nodes must be Var Node"); @@ -66,8 +66,8 @@ std::unique_ptr SequentialExecutionPass::ApplyImpl( } PADDLE_ENFORCE_NOT_NULL(found_node, "Cannot find op_desc in graph: %s", - found_node->Op()->Type()); - for (auto *pending_op : pending_ops.at(found_node)) { + op_desc->Type()); + for (auto *pending_op : pending_ops[found_node]) { if (--op_deps.at(pending_op) == 0) { ready_ops.insert(pending_op); } -- GitLab