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

Fuse Pad even if Cast is present in-between #21640

Merged
merged 11 commits into from
Aug 9, 2024
Merged

Conversation

sumitsays
Copy link
Contributor

@sumitsays sumitsays commented Aug 6, 2024

Description

This change enhances the existing Pad Fusion to fuse Pad even if a Cast operator is present between Pad and Conv/MaxPool/AveragePool. It keeps the Cast as it is.

/*
 * Before Fusion:
 *     Pad
 *      |
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 * 
 * After Fusion:
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 */

Motivation and Context

fdwr
fdwr previously approved these changes Aug 7, 2024
Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems correct (minor comments).

onnxruntime/core/optimizer/pad_fusion.cc Outdated Show resolved Hide resolved
onnxruntime/core/optimizer/pad_fusion.cc Show resolved Hide resolved
@sumitsays
Copy link
Contributor Author

/azp run orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@prathikr prathikr added release:1.19.0 Cherry pick to ORT 1.19 release:1.18.2 labels Aug 7, 2024
@sumitsays
Copy link
Contributor Author

/azp run orttraining-ortmodule-distributed

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sumitsays
Copy link
Contributor Author

/azp run orttraining-linux-gpu-ci-pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sumitsays sumitsays merged commit 702b2e2 into main Aug 9, 2024
97 of 98 checks passed
@sumitsays sumitsays deleted the user/sumita/padCastConv branch August 9, 2024 13:53
sumitsays added a commit that referenced this pull request Aug 9, 2024
### Description
This change enhances the existing Pad Fusion to fuse Pad even if a Cast
operator is present between Pad and Conv/MaxPool/AveragePool. It keeps
the Cast as it is.
<pre>
/*
 * Before Fusion:
 *     Pad
 *      |
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 * 
 * After Fusion:
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 */
</pre>


### 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>
prathikr pushed a commit that referenced this pull request Aug 12, 2024
### Description
This change enhances the existing Pad Fusion to fuse Pad even if a Cast
operator is present between Pad and Conv/MaxPool/AveragePool. It keeps
the Cast as it is.
<pre>
/*
 * Before Fusion:
 *     Pad
 *      |
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 * 
 * After Fusion:
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 */
</pre>


### 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 12, 2024
### Description
This change enhances the existing Pad Fusion to fuse Pad even if a Cast
operator is present between Pad and Conv/MaxPool/AveragePool. It keeps
the Cast as it is.
<pre>
/*
 * Before Fusion:
 *     Pad
 *      |
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 * 
 * After Fusion:
 *    Cast (Optional)
 *      |
 *   Conv/MaxPool/AveragePool
 */
</pre>


### 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 12, 2024
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.

5 participants