Skip to content

[OpenVINOQuantizer] Fix Method to Obtain Quantization Parameters#18684

Draft
anzr299 wants to merge 5 commits intopytorch:mainfrom
anzr299:patch-5
Draft

[OpenVINOQuantizer] Fix Method to Obtain Quantization Parameters#18684
anzr299 wants to merge 5 commits intopytorch:mainfrom
anzr299:patch-5

Conversation

@anzr299
Copy link
Copy Markdown
Contributor

@anzr299 anzr299 commented Apr 3, 2026

Summary

A recent change in NNCF functions to return quantization parameters breaks the OpenVINO quantizer observers.
This PR addresses the issue and also adds backwards support for this problem.

Copilot AI review requested due to automatic review settings April 3, 2026 13:46
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 3, 2026

🔗 Helpful Links

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

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

❌ 2 New Failures, 2 Unrelated Failures

As of commit b4e17de with merge base 6823b33 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@meta-cla meta-cla 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 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes OpenVINO weight-compression observers to handle an NNCF API change where integer quantization now returns a structured object (quantization parameters), while attempting to preserve compatibility with older NNCF behavior.

Changes:

  • Adds handling for do_integer_quantization(...) returning a CompressedWeight object (newer NNCF).
  • Adds fallback handling for legacy tuple return (q_weight, scale, zp) (older NNCF).
  • Introduces a new import for CompressedWeight to support the new return type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 14:00
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

anzr299 and others added 2 commits April 3, 2026 18:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 14:10
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@anzr299 anzr299 marked this pull request as draft April 3, 2026 14:15
@anzr299 anzr299 changed the title [OpenVINOQuantizer] Fix Support for Latest NNCF Changes [OpenVINOQuantizer] Point NNCF Version to Latest Release Apr 3, 2026
@anzr299 anzr299 changed the title [OpenVINOQuantizer] Point NNCF Version to Latest Release [OpenVINOQuantizer] Fix Method to Obtain Quantization Parameters Apr 3, 2026
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.

2 participants