Skip to content

Conversation

@skottmckay
Copy link
Contributor

Description

  • Treat Resize as layout sensitive by default
    • whilst the ONNX spec does not specify a layout, EPs tend to implement only one
    • add second usage in L2 of TransposeOptimizer to plugin the ability to push a Transpose through a Resize assigned to the CPU EP
  • Allow EP specific logic for changes the ops considered to be layout sensitive to be plugged in

Motivation and Context

Finish simplifying/clarifying transpose optimization and layout transformation that was proposed in #15552. This PR along with #17618 should complete the changes.

edgchen1
edgchen1 previously approved these changes Sep 25, 2023
@skottmckay skottmckay dismissed stale reviews from adrianlizarraga and edgchen1 via 515c52d September 27, 2023 00:27
@skottmckay skottmckay merged commit 9cb60c5 into main Sep 28, 2023
@skottmckay skottmckay deleted the skottmckay/ImproveResizeTransposeOptimization branch September 28, 2023 22:11
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
### Description
<!-- Describe your changes. -->
- Treat Resize as layout sensitive by default
- whilst the ONNX spec does not specify a layout, EPs tend to implement
only one
- add second usage in L2 of TransposeOptimizer to plugin the ability to
push a Transpose through a Resize assigned to the CPU EP
- Allow EP specific logic for changes the ops considered to be layout
sensitive to be plugged in
  - expected usage is for microsoft#17200 


### 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. -->
Finish simplifying/clarifying transpose optimization and layout
transformation that was proposed in microsoft#15552. This PR along with microsoft#17618
should complete the changes.

---------

Co-authored-by: Edward Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants