提交 a7d700e0 编写于 作者: Q qijun

revert local scope to TODO

上级 f087533c
...@@ -56,7 +56,9 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope) { ...@@ -56,7 +56,9 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope) {
auto& block = pdesc.blocks(0); auto& block = pdesc.blocks(0);
auto& device = device_contexts_[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()) { for (auto& var : block.vars()) {
scope->NewVar(var.name()); scope->NewVar(var.name());
...@@ -65,7 +67,7 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope) { ...@@ -65,7 +67,7 @@ void Executor::Run(const ProgramDesc& pdesc, Scope* scope) {
for (auto& op_desc : block.ops()) { for (auto& op_desc : block.ops()) {
auto op = paddle::framework::OpRegistry::CreateOp(op_desc); auto op = paddle::framework::OpRegistry::CreateOp(op_desc);
std::cout << op->DebugString() << std::endl; std::cout << op->DebugString() << std::endl;
op->Run(local_scope, *device); op->Run(*scope, *device);
} }
// TODO(tonyyang-svail): need to test gpu device // TODO(tonyyang-svail): need to test gpu device
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册