-
Notifications
You must be signed in to change notification settings - Fork 821
[OpenVINO] Fix Quantizer for PTQ #15891
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15891
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 2d8919f with merge base 7fa93a7 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @anzr299! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
This PR needs a
|
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.
Pull request overview
This PR fixes critical bugs in the OpenVINO quantizer's Post-Training Quantization (PTQ) implementation. The changes simplify the MinMaxQuantization initialization by delegating configuration to the caller via kwargs, and fix a critical bug where a missing return statement would have caused _get_edge_or_node to return None.
Key Changes:
- Simplified MinMaxQuantization initialization by removing preset/model_type logic
- Fixed missing return statement in
_get_edge_or_nodemethod for weight quantization - Refactored weight compression mode string handling
Comments suppressed due to low confidence (2)
backends/openvino/quantizer/quantizer.py:23
- Import of 'nncf_logger' is not used.
from nncf.common.logging import nncf_logger # type: ignore[import-untyped]
backends/openvino/quantizer/quantizer.py:35
- Import of 'get_weight_tensor_port_ids' is not used.
from nncf.torch.model_graph_manager import ( # type: ignore[import-untyped]
get_weight_tensor_port_ids,
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
There are some lint errors. Please run this command locally: https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#lintrunner |
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hey @mergennachin, Fixed the lint issues. All tests seem to be passing now expect for the one failure not related to this PR |
Summary
PTQ in OpenVINO quantizer was causing errors which are fixed in this PR.
cc @kimishpatel @jerryzh168 @digantdesai