onnxruntime/onnxruntime
Adrian Lizarraga a47254eaef
Remove empty (DQ -> Q -> graph output) sequence in TransposeOptimizer (#22172)
### Description
Updates the TransposeOptimizer to also remove empty (DQ -> Q) sequences
that occur at a graph output. An empty DQ->Q sequence results from a
Transpose being optimized out.

Consider the following example model:

![image](https://github.com/user-attachments/assets/4e7bc4eb-ea8a-463b-9672-c4ec5ef779b2)

The TransposeOptimizer removes the final Transpose and leaves an empty
DQ->Q->output_0 sequence. This PR ensures that the final DQ->Q is also
removed.

### Motivation and Context
Models with quantized output can run on QNN EP. The inference latency of
a customer model is impacted by the unnecessary DQ->Q sequence at the
output.

---------

Co-authored-by: Scott McKay <skottmckay@gmail.com>
2024-09-24 21:02:17 -07:00
..
contrib_ops Add MLFloat16 support for LayerNormalization, SkipLayerNormalization (#22063) 2024-09-24 15:06:27 -07:00
core Remove empty (DQ -> Q -> graph output) sequence in TransposeOptimizer (#22172) 2024-09-24 21:02:17 -07:00
python [TensorRT EP] update gen_trt_engine_wrapper_onnx_model.py script (#22184) 2024-09-24 14:34:05 -07:00
test Remove empty (DQ -> Q -> graph output) sequence in TransposeOptimizer (#22172) 2024-09-24 21:02:17 -07:00
tool/etw Fix typos - 1st Wave (#21278) 2024-07-11 13:35:08 +08:00
wasm Introduce custom external data loader (#21634) 2024-08-27 12:18:52 -07:00
__init__.py bumps up version in main from 1.19 -> 1.20 (#21588) 2024-08-05 15:46:04 -07:00
ReformatSource.ps1
ReformatSourcePython.bat
VSCodeCoverage.runsettings