diff --git a/paddle/framework/executor.cc b/paddle/framework/executor.cc index 7fc407ebc94edffd7ac0883b91f2dff084363e07..c18ba049c8f107f17afd7a8e08af6b3657cfd56d 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