From 7f0c1f0d22ed110524a9360cc47912916f8f5294 Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:33:33 +0800 Subject: [PATCH] Remove redundant code in pe engine (#46110) (#46145) --- paddle/fluid/jit/engine/pe_engine.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/paddle/fluid/jit/engine/pe_engine.cc b/paddle/fluid/jit/engine/pe_engine.cc index 2d35a8792e..78e4866754 100644 --- a/paddle/fluid/jit/engine/pe_engine.cc +++ b/paddle/fluid/jit/engine/pe_engine.cc @@ -85,7 +85,6 @@ void PEEngine::CreateGraphAndPE() { graph_ = std::make_shared(program_desc, start_op_index, end_op_index); inner_pe_ = std::make_shared( place_, &scope_, execution_strategy, build_strategy, graph_.get()); - inner_pe_->PrepareVariables(&scope_); inner_pe_->SkipMemoryReuse(/*scope_idx=*/0, info_->InputArgNames()); } @@ -97,14 +96,8 @@ std::vector PEEngine::operator()(const std::vector &inputs) { std::vector PEEngine::operator()( const std::vector &inputs) { utils::ShareIntoScope(info_->InputArgNames(), inputs, &scope_); - - // update op_handle scope_map in pe->executor_->Graph - std::unordered_map scope_map = { - {inner_pe_->GetLocalScopes().front(), &scope_}}; - inner_pe_->ResetOpHandleScopeMapOfGraphs(scope_map); // need to recreate tmp variables in new scope inner_pe_->PrepareVariables(&scope_); - inner_pe_->RunWithoutFetch(info_->OutputArgNames()); std::vector outputs; -- GitLab