MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / apply

Method apply

src/fuse_reduce.cpp:426–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424} // namespace
425
426void fuse_reduce::apply(module_pass_manager& mpm) const
427{
428 if(enabled(MIGRAPHX_DISABLE_REDUCE_FUSION{}))
429 return;
430 create_reduce_modules(mpm);
431 mpm.run_pass(dead_code_elimination{});
432 for(int i = 0; i < 4; i++)
433 {
434 if(enable_rewrite_reshapes)
435 mpm.run_pass(rewrite_reshapes<reduce_reshape>{});
436 match::find_matches(
437 mpm, find_reduce_pointwise{}, find_pointwise_reduce{}, find_reduce_reduce{});
438 mpm.run_pass(dead_code_elimination{});
439 }
440}
441
442} // namespace MIGRAPHX_INLINE_NS
443} // namespace migraphx

Callers 1

finalize_reduce_moduleFunction · 0.45

Calls 4

create_reduce_modulesFunction · 0.85
find_matchesClass · 0.85
enabledFunction · 0.70
run_passMethod · 0.45

Tested by

no test coverage detected