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

[TorchFX] Support quantization with custom torch.ao quantizers via nncf.quantize_pt2e API #3231

Open
1 task
daniil-lyakhov opened this issue Jan 30, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@daniil-lyakhov
Copy link
Collaborator

🚀 Feature request

The task is to support quantization with custom torch.ao quantizers via nncf.quantize_pt2e API.

Custom quantizers list:

Feature Use Case

No response

Are you going to submit a PR?

  • Yes I'd like to help by submitting a PR!
@daniil-lyakhov daniil-lyakhov added the enhancement New feature or request label Jan 30, 2025
@daniil-lyakhov daniil-lyakhov self-assigned this Jan 30, 2025
nikita-malininn pushed a commit that referenced this issue Jan 31, 2025
…3232)

### Changes

* `symmetric_range` and `asymmetric_range` functions were refactored to
avoid dependency on quantization group
* input configs of `test_calculate_quantizer_parameters` were updated to
align with real cases computed by the solver with `cpu.json` HW config
(all symmetric weights configs have `signedness_to_force=True` in actual
code)

### Reason for changes

`symmetric_range` and `asymmetric_range` functions are using prior
knowledge about HW config (if symmetric and weights -> input_low =
-input_high) but could just use the qconfig attributes (signed == True
and narrow_range == True -> input_low = -input_high) . New quantizers
from the #3231 does not obey hardcoded OpenVINO HW config rules (X86
quantizer require narrow_range false for symmetric weights, for
example), thus support of the new quantizers requires more general
`calculate_quantizer_parameters` function


### Related tickets

#3231

### Tests

* test_calculate_quantizer_parameters is updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant