| 615 | } // namespace |
| 616 | |
| 617 | void 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 |
nothing calls this directly
no test coverage detected