-
Notifications
You must be signed in to change notification settings - Fork 244
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]: Remove backend-specific methods from the common layer attributes #3249
Comments
.take |
Thank you for looking into this issue! Please let us know if you have any questions or require any help. |
Hi @shumaari, List of the method usage is correct, thanks for your analysis. I'm apologies for not clear instructions, the task is to create 3 functions (not class methods) in the https://github.com/openvinotoolkit/nncf/blob/develop/nncf/common/graph/utils.py file. Then, the assignee have to replate method calls with the functions calls. Please don't spend too much time on the error reproduction: it isn't a error indeed, it is a wrong usage of a backend-specific method |
Context
Greetings, fellow scientists😺!
Recently we've discovered an old code that becomes confusing when used with the latest algorithms:
https://github.com/openvinotoolkit/nncf/blob/develop/nncf/common/graph/layer_attributes.py#L56-L79
https://github.com/openvinotoolkit/nncf/blob/develop/nncf/common/graph/layer_attributes.py#L135-L136
the problematic methods are
get_weights_shape
,get_target_dim_for_compression
andget_bias_shape
. Current algorithms use NNCFGraph to retrieve correct info, and not every backend follow the hardcoded weights shape layout / compression dim.What needs to be done?
The task is to create the following functions in the https://github.com/openvinotoolkit/nncf/blob/develop/nncf/common/graph/utils.py file:
get_weights_shape_legacy(layer_attributes: WeightedLayerAttributes)
get_target_dim_for_compression_legacy(layer_attributes: WeightedLayerAttributes)
get_bias_shape_legacy(layer_attributes: WeightedLayerAttributes)
Additionally, all calls to the following methods should be replaced with their corresponding legacy function calls:
get_weights_shape
->get_weights_shape_legacy
get_target_dim_for_compression
->get_target_dim_for_compression_legacy
get_bias_shape
->get_bias_shape_legacy
Furthermore, the docstrings of these methods should clarify that they are valid only for PyTorch and TensorFlow backends.
Example Pull Requests
#3179
Resources
Contact points
@daniil-lyakhov
Ticket
No response
The text was updated successfully, but these errors were encountered: