From 5c3e85858d43e111bf0f7f4a4436e4094933d816 Mon Sep 17 00:00:00 2001 From: WangZhen <23097963+0x45f@users.noreply.github.com> Date: Fri, 16 Sep 2022 17:58:48 +0800 Subject: [PATCH] Remove redundant code in pe engine (#46110) --- 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 2d35a8792ef..78e48667547 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