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

Method apply

src/simplify_qdq.cpp:617–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615} // namespace
616
617void simplify_qdq::apply(module& m) const
618{
619 if(remove_qdq_only)
620 {
621 match::find_matches(m, remove_qdq_pairs{});
622 }
623 else
624 {
625 // first step: add pack/unpack pair between qdq for int4 weights
626 add_int4_pack_unpack_pair(m);
627 match::find_matches(m, match_find_quantizable_ops{});
628 migraphx::run_passes(m, {migraphx::dead_code_elimination{}});
629 if(use_mx_quant)
630 {
631 match::find_matches(m, match_find_mx_quantizable_ops{});
632 migraphx::run_passes(m, {migraphx::dead_code_elimination{}});
633 }
634 match::find_matches(m, remove_qdq_pairs{});
635 migraphx::run_passes(m, {migraphx::dead_code_elimination{}});
636 match::find_matches(m, match_qlinear_reused{});
637 migraphx::run_passes(m, {migraphx::dead_code_elimination{}});
638 match::find_matches(m, match_concat_qlinear{});
639 migraphx::run_passes(m, {migraphx::dead_code_elimination{}});
640 remove_zero_point(m);
641 }
642}
643
644} // namespace MIGRAPHX_INLINE_NS
645} // namespace migraphx

Callers

nothing calls this directly

Calls 4

find_matchesClass · 0.85
run_passesFunction · 0.85
remove_zero_pointFunction · 0.85

Tested by

no test coverage detected