onnxruntime
5bae32eb - Extend DoubleQDQPairsRemover to handle sequences that end in duplicate DQ nodes (#20759)

Commit
1 year ago
Extend DoubleQDQPairsRemover to handle sequences that end in duplicate DQ nodes (#20759) ### Description Extend the DoubleQDQPairsRemover optimizer to also handle sequences that end in duplicate DQ nodes. For example, the following sequence: ``` Q1 --> DQ1 --> Q2 --+--> DQ2 | +--> DQ2' ``` Is now simplified to: ``` Q1 ---+--> DQ2 | +--> DQ2' ``` ### Motivation and Context The EnsureUniqueDQNodeUnits pass may add duplicate DQ nodes to ensure valid QDQ node units. The DoubleQDQPairsRemover should still be able to remove unnecessary QDQ ops if the target sequence ends in duplicate DQ nodes. --------- Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
Parents
Loading