Skip to content

Qualcomm AI Engine Direct - Add rewrite function of observer #10093

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chunit-quic
Copy link
Collaborator

@chunit-quic chunit-quic commented Apr 11, 2025

  • Add function to rewrite observer after prepare_pt2e
  • Add corresponding test case

- Add function to rewrite observer after prepare_pt2e
- Add corresponding test case
@chunit-quic chunit-quic requested a review from cccclai as a code owner April 11, 2025 00:25
Copy link

pytorch-bot bot commented Apr 11, 2025

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit 2c9c79c with merge base 1d43b3b (image):

NEW FAILURES - The following jobs have failed:

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 Apr 11, 2025
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@chunit-quic
Copy link
Collaborator Author

Hi @cccclai,

This PR is for the requested functionality to overwrite a quanization parameters after calibration. It can handle shared observer too. Thank you!

@cccclai
Copy link
Contributor

cccclai commented Apr 15, 2025

@chunit-quic thanks for putting up the pr. cc: @sxu @billmguo

@cccclai
Copy link
Contributor

cccclai commented Apr 15, 2025

Mind sharing a bit more details for the request? I probably miss it

@chunit-quic
Copy link
Collaborator Author

chunit-quic commented Apr 16, 2025

Mind sharing a bit more details for the request? I probably miss it

No problem. :)
We received some feature requests in a mail thread regarding quantization requirements. This particular request is for the following purpose:

The QNN Quantizer should allow users to override quantization parameters for specific tensors, regardless of the data ranges observed during calibration or QAT. This override must respect the transitive closures established by SharedQuantizationSpec.

After a brief discussion your team, we concluded that the rewriting stage should occur after calibration but before conversion. That's essentially the background.

@cccclai cccclai requested review from sxu and billmguo April 17, 2025 19:35
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants