-
Notifications
You must be signed in to change notification settings - Fork 243
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 MinMax algorithm #2872
Comments
I'd like to work on this |
Hi, @Patsnoop, do you still plan to contribute? |
Good Afternoon. Yes I do plan on working on this tomorrow and submitting this weekend. |
hey @Patsnoop do you need any support here? |
Hi, is this issue being worked on? If not, I'd like to attempt this as well :) Thank you. |
@daniil-lyakhov please reassign |
Hi @daniil-lyakhov, I hope this isn't too basic of a question, but I wanted to clarify something. In the test_get_channel_axes_matmul_torch test in TemplateTestMinMaxAlgorithm, the doc string specifies that it is to "check MatMul quantization axes in MinMax for Torch". The test assigns layer attributes for the matmul node but I'm not sure why, when I inspected the torch and torch_fx MinMax algo code, the layer_attributes aren't really used, I even commented out the line of code and the tests still pass for both backends, is it safe to say that matmul layer attributes aren't necessary to be defined for Torch and Torch FX and that line of code can be removed from the template since only the node metatype is utilized or what exactly would you suggest? Edit: Can get_conv_node_attrs, get_depthwiseconv_node_attrs and get_matmul_node_attrs be passed instead of returning Convolution and Linear layer attributes since they aren't necessary for Torch FX backend? |
Hi @rk119, Thank you for your observations! Please remove all the unused code and structures from the torch and torchFX test Min Max. And don't hesitate to open PRs and discuss ideas explicitly in the code |
@daniil-lyakhov Alright, will do so! :) I will open a PR soon for this issue. |
### Changes 1. Added a new test file in tests/torch/fx. Implemented `TemplateTestMinMaxAlgorithm` for Torch Fx backend. 2. Fixed a doc string mistake in `tests/cross_fw/test_templates/test_min_max.py`. Removed the line of code in the test `test_get_channel_axes_matmul_torch` that assigns the matmul node's layer attributes. 3. Made changes to `tests/torch/ptq/test_min_max.py` to pass the functions that handle backend-specific layer attributes. ### Reason for changes For changes 2 and 3, only the node metatypes are required to test target point shape and weight quantization channel axes. ### Related tickets #2872
Thanks for the contribution! |
Greetings🐱! As a part of #2766 TorchFX PTQ backend support, we are gladly presenting to you following issue:
Implement TemplateTestMinMaxAlgorithm as it done for other backends(example: https://github.com/openvinotoolkit/nncf/blob/develop/tests/torch/ptq/test_min_max.py)
Example Pull Requests
#2856
Resources
Contact points
@daniil-lyakhov
Ticket
#2766
The text was updated successfully, but these errors were encountered: