From a7d700e0ba35e78cfbe85acf2d0b4cb72d22b10f Mon Sep 17 00:00:00 2001 From: qijun Date: Fri, 6 Oct 2017 16:30:44 -0700 Subject: [PATCH] revert local scope to TODO --- paddle/framework/executor.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/framework/executor.cc b/paddle/framework/executor.cc index 7fc407ebc9..c18ba049c8 100644 --- a/paddle/framework/executor.cc +++ b/paddle/framework/executor.cc @@ -56,7 +56,9 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope) { auto& block = pdesc.blocks(0); auto& device = device_contexts_[0]; - Scope& local_scope = scope->NewScope(); + // TODO(tonyyang-svail): + // - runs on a new local scope + // Scope& local_scope = scope->NewScope(); for (auto& var : block.vars()) { scope->NewVar(var.name()); @@ -65,7 +67,7 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope) { for (auto& op_desc : block.ops()) { auto op = paddle::framework::OpRegistry::CreateOp(op_desc); std::cout << op->DebugString() << std::endl; - op->Run(local_scope, *device); + op->Run(*scope, *device); } // TODO(tonyyang-svail): need to test gpu device -- GitLab