Skip to content

Conversation

@Lafi7e
Copy link
Contributor

@Lafi7e Lafi7e commented Nov 19, 2024

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.

Copy link
Contributor

@github-actions github-actions bot left a 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.

@Lafi7e Lafi7e marked this pull request as ready for review December 3, 2024 08:44
@Lafi7e Lafi7e changed the title Add Optional Activation node to NodeUnit Add Optional Redundant Clip Node to NodeUnit Dec 3, 2024
@Lafi7e Lafi7e merged commit 4134cd9 into main Jan 9, 2025
95 checks passed
@Lafi7e Lafi7e deleted the weicwang/node_unit_act branch January 9, 2025 02:25
// Check if SelectorManager get a add qdq group selection as expected
{
QDQ::SelectorManager selector_mgr;
const auto result = selector_mgr.GetQDQSelections(whole_graph_viewer);
Copy link
Contributor

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants