Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Pad Fusion for AveragePool #21556

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Conversation

sumitsays
Copy link
Contributor

Description

This extends the existing pad_fusion for AveragePool operator i.e. fuse Pad if it is followed by AveragePool operator.

Motivation and Context

@sumitsays sumitsays requested review from smk2007 and jeffbloo July 29, 2024 23:50
@sumitsays sumitsays merged commit 1637f22 into main Jul 30, 2024
96 of 98 checks passed
@sumitsays sumitsays deleted the user/sumita/padAvgPoolFusion branch July 30, 2024 16:35
sumitsays added a commit that referenced this pull request Aug 5, 2024
### Description
This extends the existing pad_fusion for AveragePool operator i.e. fuse
Pad if it is followed by AveragePool operator.



### 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. -->
@sumitsays sumitsays restored the user/sumita/padAvgPoolFusion branch August 6, 2024 05:38
@sumitsays sumitsays added the release:1.19.0 Cherry pick to ORT 1.19 label Aug 6, 2024
prathikr pushed a commit that referenced this pull request Aug 7, 2024
### Description
This extends the existing pad_fusion for AveragePool operator i.e. fuse
Pad if it is followed by AveragePool operator.



### 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. -->
prathikr pushed a commit that referenced this pull request Aug 7, 2024
### Description
This extends the existing pad_fusion for AveragePool operator i.e. fuse
Pad if it is followed by AveragePool operator.



### 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. -->
prathikr pushed a commit that referenced this pull request Aug 7, 2024
### Description
This extends the existing pad_fusion for AveragePool operator i.e. fuse
Pad if it is followed by AveragePool operator.



### 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. -->
@prathikr prathikr added the cherry-picked Cherry-picked for a cherrypicks branch label Aug 7, 2024
sumitsays added a commit that referenced this pull request Aug 8, 2024
### Description
This extends the existing pad_fusion for AveragePool operator i.e. fuse
Pad if it is followed by AveragePool operator.



### 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. -->
sumitsays added a commit that referenced this pull request Aug 12, 2024
…1670)

### Description
This change cherry-picks 2 Pad fusion optimization:
#21640 and
#21556.

It also has to cherry-pick 2 extra changes to unblock pipeline and
dependency failure: #21300
and #21662 (didn't include
test which are part of 1.18.1 payload).

Also uploaded new version of
[onnxruntime_build_dependencies:10.177](https://dev.azure.com/onnxruntime/onnxruntime/_artifacts/feed/onnxruntime/UPack/onnxruntime_build_dependencies/overview/1.0.177)
and updated the same in `download-deps.yml`.

Additionally it also updates DML binary to 1.15.1.



### 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. -->

---------

Co-authored-by: Changming Sun <chasun@microsoft.com>
Co-authored-by: Tianlei Wu <tlwu@microsoft.com>
snnn pushed a commit that referenced this pull request Jan 7, 2025
### Description
Fusing Pad & AveragePool requires AveragePool to use
`count_include_pad=1`. If the AveragePool already set some padding and
`count_include_pad=0`, fusion can't happen.

This PR adds a condition to perform fusion depending on those
attributes. If fusion occurs, `count_include_pad` is always set to `1`.

### Motivation and Context
Fix #22177 (mislabelled as a performance issue but there's an actual bug
in the implementation)
Bug introduced in #21556
snnn pushed a commit that referenced this pull request Jan 8, 2025
### Description
Fusing Pad & AveragePool requires AveragePool to use
`count_include_pad=1`. If the AveragePool already set some padding and
`count_include_pad=0`, fusion can't happen.

This PR adds a condition to perform fusion depending on those
attributes. If fusion occurs, `count_include_pad` is always set to `1`.

### Motivation and Context
Fix #22177 (mislabelled as a performance issue but there's an actual bug
in the implementation)
Bug introduced in #21556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked Cherry-picked for a cherrypicks branch release:1.18.2 release:1.19.0 Cherry pick to ORT 1.19
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants