Skip to content
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

[Experimental][TorchFX] OpenVINOQuantizer #3203

Merged

Conversation

daniil-lyakhov
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov commented Jan 21, 2025

Changes

  • torch.ao OpenVINOQuantizer as well as OpenVINOQuantizerAdapter are introduced
  • quantize_pt2e function is updated to work with OpenVINOQuantizer

Reason for changes

  • To enable OpenVINO quantization for torch.ao quantization pipelines (torch.ao.quantization.prepare_pt2e, torch.ao.quantization.convert_pt2e) and quantize_pt2e API function

Related tickets

#2766

Tests

tests/torch/fx/test_quantizer.py is updated with use cases:

  • OpenVINOQuantizer + quantize_pt2e
  • OpenVINOQuantizer +torch.ao.quantization.prepare_pt2e -> torch.ao.quantization.convert_pt2e

@daniil-lyakhov daniil-lyakhov requested a review from a team as a code owner January 21, 2025 10:57
@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch experimental labels Jan 21, 2025
@daniil-lyakhov daniil-lyakhov force-pushed the dl/fx/openvino_quantizer branch 2 times, most recently from b953569 to 0999c82 Compare January 23, 2025 15:58
Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

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

LGTM. Please, address the last comments.

Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@anzr299 anzr299 left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexsu52 alexsu52 merged commit 1b6af84 into openvinotoolkit:develop Jan 28, 2025
17 checks passed
daniil-lyakhov added a commit to daniil-lyakhov/nncf that referenced this pull request Jan 28, 2025
### Changes

* torch.ao `OpenVINOQuantizer` as well as `OpenVINOQuantizerAdapter` are
introduced
* `quantize_pt2e` function is updated to work with `OpenVINOQuantizer` 

### Reason for changes

* To enable OpenVINO quantization for torch.ao quantization pipelines
(`torch.ao.quantization.prepare_pt2e`,
`torch.ao.quantization.convert_pt2e`) and quantize_pt2e API function

### Related tickets

openvinotoolkit#2766 

### Tests

tests/torch/fx/test_quantizer.py is updated with use cases:
- `OpenVINOQuantizer` + `quantize_pt2e`
- `OpenVINOQuantizer` +`torch.ao.quantization.prepare_pt2e` ->
`torch.ao.quantization.convert_pt2e`
MaximProshin pushed a commit that referenced this pull request Jan 28, 2025
Follow up of #3203 

### Changes

* torch.ao `OpenVINOQuantizer` as well as `OpenVINOQuantizerAdapter` are
introduced
* `quantize_pt2e` function is updated to work with `OpenVINOQuantizer` 

### Reason for changes

* To enable OpenVINO quantization for torch.ao quantization pipelines
(`torch.ao.quantization.prepare_pt2e`,
`torch.ao.quantization.convert_pt2e`) and quantize_pt2e API function

### Related tickets

#2766 

### Tests

tests/torch/fx/test_quantizer.py is updated with use cases:
- `OpenVINOQuantizer` + `quantize_pt2e`
- `OpenVINOQuantizer` +`torch.ao.quantization.prepare_pt2e` ->
`torch.ao.quantization.convert_pt2e`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental NNCF PT Pull requests that updates NNCF PyTorch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants