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

Method apply

src/optimize_module.cpp:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35inline namespace MIGRAPHX_INLINE_NS {
36
37void optimize_module::apply(module_pass_manager& mpm) const
38{
39 mpm.get_module().repeat_while_changes(2, [&] {
40 // loop to further optimize after initial transformations
41 mpm.get_module().repeat_while_changes(4, [&] {
42 mpm.run_pass(simplify_reshapes{});
43 mpm.run_pass(eliminate_convert{});
44 mpm.run_pass(dead_code_elimination{});
45 mpm.run_pass(simplify_algebra{});
46 });
47 mpm.run_pass(eliminate_common_subexpression{});
48 mpm.run_pass(dead_code_elimination{});
49 mpm.run_pass(propagate_constant{propagate_constant_skip_ops});
50 mpm.run_pass(dead_code_elimination{});
51 });
52}
53
54} // namespace MIGRAPHX_INLINE_NS
55} // namespace migraphx

Callers

nothing calls this directly

Calls 3

repeat_while_changesMethod · 0.80
get_moduleMethod · 0.80
run_passMethod · 0.45

Tested by

no test coverage detected