onnxruntime/tools
Scott McKay 697dd12f6e
Re-organize the transpose optimization and layout transformation files. (#16246)
### Description
<!-- Describe your changes. -->
Split out the more basic changes from #15552 for easier review.

Re-organize to clarify the structure
- Separate out generic base functionality from ORT specific components
  - pass in handlers for internal ORT ops to Optimize
- Split out layout transformation from transpose optimization
- Separate out level 1 transpose optimizer
- Cleanup some naming to try and clarify things like an optimizer vs.
general optimization code

Most of the changes are from this movement of code.

Two implementation changes:
- the extended handlers are queried first in GetHandler
- allows the extended handlers to override the default behaviour for an
ONNX operator
- simplify the Optimize function to remove OptimizerMode. 
- `can_modify_node` is used instead of `mode` and
`ignore_assigned_nodes` and a long description of the current usage is
added. I don't _think_ that changes the current behavior and hopefully
clarifies what happens and when, and makes the base transpose optimizer
implementation more generic.

### 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. -->
Create a cleaner separation to support adding EP specific logic next to
cleanly handle where an EP has additional layout sensitive behaviour
required (e.g. it's Resize implementation only handles one layout).
2023-07-07 08:24:47 +10:00
..
android_custom_build Update cmake version in a few places (#15775) 2023-05-02 22:56:28 -07:00
ci_build Re-organize the transpose optimization and layout transformation files. (#16246) 2023-07-07 08:24:47 +10:00
doc Python documentation for onnxruntime-training (#15765) 2023-05-02 16:58:16 -07:00
nuget [DML EP] Update DirectML version to 1.12.0 (#16011) 2023-05-18 19:37:12 -07:00
perf_view
python Add ability to create ort format models from training offline utility (#16360) 2023-06-21 18:51:43 -07:00