-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add Optional Redundant Clip Node to NodeUnit #22888
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can commit the suggested changes from lintrunner.
skottmckay
reviewed
Nov 21, 2024
onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selectors.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selectors.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selectors.cc
Show resolved
Hide resolved
skottmckay
reviewed
Dec 3, 2024
skottmckay
approved these changes
Dec 4, 2024
adrianlizarraga
approved these changes
Jan 9, 2025
liqunfu
reviewed
Jan 9, 2025
| // Check if SelectorManager get a add qdq group selection as expected | ||
| { | ||
| QDQ::SelectorManager selector_mgr; | ||
| const auto result = selector_mgr.GetQDQSelections(whole_graph_viewer); |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line build failed at my local. The function requires logger
tarekziade
pushed a commit
to tarekziade/onnxruntime
that referenced
this pull request
Jan 10, 2025
Currently we have Clip/Relu with Q fusion on level 2. But for EPs that are using NodeUnit, these optimizers are not applied. If we want to remove such redundant Clip/Relu nodes, we need to add code to handle it for each EP separately. The PR detects a Clip/Relu is made redundant with a Q node, and add this information to the corresponding QDQ NodeUnit, so that EPs can ignore it, and can handle the target node only in the QDQ NodeUnit.
guschmue
pushed a commit
that referenced
this pull request
Jan 12, 2025
Currently we have Clip/Relu with Q fusion on level 2. But for EPs that are using NodeUnit, these optimizers are not applied. If we want to remove such redundant Clip/Relu nodes, we need to add code to handle it for each EP separately. The PR detects a Clip/Relu is made redundant with a Q node, and add this information to the corresponding QDQ NodeUnit, so that EPs can ignore it, and can handle the target node only in the QDQ NodeUnit.
ashrit-ms
pushed a commit
that referenced
this pull request
Mar 17, 2025
Currently we have Clip/Relu with Q fusion on level 2. But for EPs that are using NodeUnit, these optimizers are not applied. If we want to remove such redundant Clip/Relu nodes, we need to add code to handle it for each EP separately. The PR detects a Clip/Relu is made redundant with a Q node, and add this information to the corresponding QDQ NodeUnit, so that EPs can ignore it, and can handle the target node only in the QDQ NodeUnit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we have Clip/Relu with Q fusion on level 2. But for EPs that are using NodeUnit, these optimizers are not applied. If we want to remove such redundant Clip/Relu nodes, we need to add code to handle it for each EP separately.
The PR detects a Clip/Relu is made redundant with a Q node, and add this information to the corresponding QDQ NodeUnit, so that EPs can ignore it, and can handle the target node only in the QDQ NodeUnit.