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

[Good First Issue][NNCF]: [TorchFX] Test PTQ quantizer config #2874

Closed
daniil-lyakhov opened this issue Aug 6, 2024 · 8 comments
Closed
Assignees
Labels
good first issue Good for newcomers

Comments

@daniil-lyakhov
Copy link
Collaborator

daniil-lyakhov commented Aug 6, 2024

Greetings🐱! As a part of #2766 TorchFX PTQ backend support, we are gladly presenting to you following issue:

Implement TemplateTestQuantizerConfig as it done for other backends(example: https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/ptq/test_quantizer_config.py)

Example Pull Requests

#2856

Resources

Contact points

@daniil-lyakhov

Ticket

#2766

@daniil-lyakhov daniil-lyakhov added the good first issue Good for newcomers label Aug 6, 2024
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Aug 6, 2024
@anzr299
Copy link
Contributor

anzr299 commented Aug 7, 2024

@rk119

@rk119
Copy link
Contributor

rk119 commented Aug 7, 2024

.take

Copy link

github-actions bot commented Aug 7, 2024

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

@alexsu52 alexsu52 moved this from Contributors Needed to Assigned in Good first issues Aug 7, 2024
@rk119
Copy link
Contributor

rk119 commented Aug 8, 2024

Hi @daniil-lyakhov,

I am encountering an issue with the test_depthwise_conv_default_quantizer_config test case in test_quantizer_config.py. The test is failing because the length of q_setup is 1 instead of the expected 2.

Upon further investigation, I found that the get_weight_nodes function for Torch FX min_max does not include the PTDepthwiseConv2dSubtype metatype in its list of recognized metatypes. As a result, the weight nodes variable in _get_quantizer_setup is empty, leading to the failure.

Could you please confirm if the PTDepthwiseConv2dSubtype metatype should be included in the list? If so, that should resolve the issue. Else, I'd appreciate some guidance.

@daniil-lyakhov
Copy link
Collaborator Author

daniil-lyakhov commented Aug 8, 2024

Hi @daniil-lyakhov,

I am encountering an issue with the test_depthwise_conv_default_quantizer_config test case in test_quantizer_config.py. The test is failing because the length of q_setup is 1 instead of the expected 2.

Upon further investigation, I found that the get_weight_nodes function for Torch FX min_max does not include the PTDepthwiseConv2dSubtype metatype in its list of recognized metatypes. As a result, the weight nodes variable in _get_quantizer_setup is empty, leading to the failure.

Could you please confirm if the PTDepthwiseConv2dSubtype metatype should be included in the list? If so, that should resolve the issue. Else, I'd appreciate some guidance.

Hi @rk119,
Thank you for your investigation! You are right, I've forgot to include all metatypes for nodes with weights, good catch! Please replace current weighted metatypes list with this list.

Thanks a lot!

@daniil-lyakhov
Copy link
Collaborator Author

Hi, @rk119 , do you still plan to contribute?

@rk119
Copy link
Contributor

rk119 commented Aug 22, 2024

Hi, @rk119 , do you still plan to contribute?

Hi @daniil-lyakhov, yes I do, I'll be opening a PR for this issue by next week. I'm just a little busy with other commitments.

@mlukasze mlukasze moved this from Assigned to In Review in Good first issues Sep 18, 2024
alexsu52 pushed a commit that referenced this issue Sep 23, 2024
### Changes

New test file added in tests/torch/fx. Implemented
TemplateTestQuantizerConfig for the ptq quantizer for TorchFX backend.

### Related tickets

Closes issue #2874
@alexsu52
Copy link
Contributor

@rk119, thanks for the contribution!

@github-project-automation github-project-automation bot moved this from In Review to Closed in Good first issues Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

4 participants