Skip to content

Deprecate tag qdq pass in xnnbackend #12170

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 1 commit into from
Jul 2, 2025

Conversation

abhinaykukkadapu
Copy link
Contributor

Summary:
This diff decentralizes the q/dq implicit node tagging to individual partition configs instead of tagging it as part of backend pass.

Changes in this diff:

  1. Deprecate tag q dq pass
  2. Remove all the places where this pass is used in the backend preprocess phase.
  3. Decentralize the tagging to individual configs
    a. generic_node_configs will handle most of the non gemm nodes
    b. gemm_configs will handle gemm nodes
    c. channels last pass will add (copy q dq) or (dq copy q), tag the relevant nodes.
    d. tag q dq in conv1d unsqueeze pass.
    e. Tag q dq in compose cat
  4. Deprecate configs.py where all the collection of nodes is maintained

Fixes: #11588

Reviewed By: mcr229

Differential Revision: D77055623

Copy link

pytorch-bot bot commented Jul 2, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12170

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 19 Pending

As of commit c46b635 with merge base a909b83 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 2, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77055623

@facebook-github-bot
Copy link
Contributor

@abhinaykukkadapu has imported this pull request. If you are a Meta employee, you can view this in D77055623.

abhinaykukkadapu added a commit to abhinaykukkadapu/executorch that referenced this pull request Jul 2, 2025
Summary:
This diff decentralizes the q/dq implicit node tagging to individual partition configs instead of tagging it as part of backend pass. 

Changes in this diff:
1. Deprecate tag q dq pass
2. Remove all the places where this pass is used in the backend preprocess phase.
3. Decentralize the tagging to individual configs
    a. `generic_node_configs` will handle most of the non gemm nodes
    b. `gemm_configs` will handle gemm nodes
    c. channels last pass will add (copy q dq) or (dq copy q), tag the relevant nodes.
    d. tag q dq in conv1d unsqueeze pass.
    e. Tag q dq in compose cat
4. Deprecate configs.py where all the collection of nodes is maintained



Fixes: pytorch#11588

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

Rollback Plan:

Differential Revision: D77055623

Pulled By: abhinaykukkadapu
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77055623

Summary:
This diff decentralizes the q/dq implicit node tagging to individual partition configs instead of tagging it as part of backend pass. 

Changes in this diff:
1. Deprecate tag q dq pass
2. Remove all the places where this pass is used in the backend preprocess phase.
3. Decentralize the tagging to individual configs
    a. `generic_node_configs` will handle most of the non gemm nodes
    b. `gemm_configs` will handle gemm nodes
    c. channels last pass will add (copy q dq) or (dq copy q), tag the relevant nodes.
    d. tag q dq in conv1d unsqueeze pass.
    e. Tag q dq in compose cat
4. Deprecate configs.py where all the collection of nodes is maintained



Fixes: pytorch#11588

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

Rollback Plan:

Differential Revision: D77055623

Pulled By: abhinaykukkadapu
@facebook-github-bot
Copy link
Contributor

@abhinaykukkadapu has imported this pull request. If you are a Meta employee, you can view this in D77055623.

@abhinaykukkadapu abhinaykukkadapu merged commit 38d7fc0 into pytorch:main Jul 2, 2025
95 of 97 checks passed
@abhinaykukkadapu
Copy link
Contributor Author

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label Jul 2, 2025
Tanish2101 pushed a commit to Tanish2101/executorch that referenced this pull request Jul 9, 2025
Summary:
This diff decentralizes the q/dq implicit node tagging to individual
partition configs instead of tagging it as part of backend pass.

Changes in this diff:
1. Deprecate tag q dq pass
2. Remove all the places where this pass is used in the backend
preprocess phase.
3. Decentralize the tagging to individual configs
    a. `generic_node_configs` will handle most of the non gemm nodes
    b. `gemm_configs` will handle gemm nodes
c. channels last pass will add (copy q dq) or (dq copy q), tag the
relevant nodes.
    d. tag q dq in conv1d unsqueeze pass.
    e. Tag q dq in compose cat
4. Deprecate configs.py where all the collection of nodes is maintained



Fixes: pytorch#11588

Reviewed By: mcr229

Differential Revision: D77055623
q.meta = copy.meta.copy()

# Always tag q/dq as implicit
tag_as_implicit_q_dq(dq)
Copy link
Contributor

Choose a reason for hiding this comment

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

I was talking with @mcr229 about this, this can be brittle i.e. implicit tagging for q/dq in >1 places. Do we want to add a pass in the future to verify if the tagging is correct or not. Just for validation? Feel free to create an issue, don't have to add it right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate tag implicit qdq pass
4 participants