MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / ApplyRemoveShadowFeedPass

Function ApplyRemoveShadowFeedPass

paddle/fluid/framework/executor_cache.cc:210–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210std::unique_ptr<pir::Program> ApplyRemoveShadowFeedPass(
211 std::unique_ptr<pir::Program> program,
212 const pir::Block *block,
213 const phi::Place &place,
214 const paddle::framework::Scope *scope) {
215 pir::PassManager pm(pir::IrContext::Instance(), 3);
216 auto pass = pir::CreateRemoveShadowFeedPass();
217 pass->SetNotOwned("top_block", block);
218 pass->SetNotOwned(pir::Pass::kPlaceAttr, &place);
219 pass->SetNotOwned(pir::Pass::kParamScopeAttr, scope);
220 pm.AddPass(std::move(pass));
221 pm.Run(program.get());
222
223 if (FLAGS_print_ir) {
224 std::cout << "IR After RemoveShadowFeedPass -------------------"
225 << std::endl;
226 std::cout << *program << std::endl;
227 }
228
229 return program;
230}
231
232std::unique_ptr<pir::Program> ConstructForwardIrProgram(
233 const paddle::framework::BlockDesc *forward_global_block,

Callers 2

RunProgramImplFunction · 0.85
RunProgramGradImplFunction · 0.85

Calls 6

InstanceFunction · 0.85
SetNotOwnedMethod · 0.80
AddPassMethod · 0.45
RunMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected