onnxruntime
ea245c94 - Add constant folding for simple QDQ Node Units (#15138)

Commit
3 years ago
Add constant folding for simple QDQ Node Units (#15138) ### Description <!-- Describe your changes. --> Currently we bail on constant folding if QDQ is enabled and we hit a DQ node. However, if we have a simple DQ -> X -> Q node unit where the DQ and X do not produce graph outputs, their output only has one consumer, and X is deterministic, we can constant fold all three nodes. Add support for this simple scenario primarily to constant fold a QDQ model that has had initializers updated by layout transformation, which results in patterns like `initializer -> DQ -> Transpose -> Q` or `initializer- > DQ -> Unsqueeze -> Q -> DQ -> Transpose -> Q` if the initializer is broadcast. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Improve end result of layout transformation on a QDQ model.
Author
Parents
Loading