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

Fix remove_shapeof_subgraphs #2536

Conversation

andrey-churkin
Copy link
Contributor

Changes

img

Reason for changes

The remove_shapeof_subgraphs() function removes some operations whose weights are quantized.

Related tickets

Ref: 131843

Tests

Current scope

@andrey-churkin andrey-churkin requested a review from a team as a code owner February 29, 2024 13:47
@github-actions github-actions bot added the NNCF PTQ Pull requests that updates NNCF PTQ label Feb 29, 2024
@@ -64,26 +64,26 @@ def remove_shapeof_subgraphs(
if node.metatype in shapeof_metatypes:
shape_of_nodes.append(node)
continue
if node in infer_nodes:
if node.node_name in infer_nodes:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KodiaqQ These changes are necessary because a node from quantized_model_graph contains NumPy arrays in its attributes. Therefore, it is not possible to perform the NNCFNode.__eq__() method due to this comparison

self.attributes == other.attributes

I have not changed NNCFNode.__eq__() method because these attributes are custom (they were added by algorithm).

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.63%. Comparing base (fd5b4d8) to head (a305d57).
Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2536      +/-   ##
===========================================
- Coverage    90.92%   84.63%   -6.29%     
===========================================
  Files          498      498              
  Lines        45550    45553       +3     
===========================================
- Hits         41415    38555    -2860     
- Misses        4135     6998    +2863     
Files Coverage Δ
...quantization/algorithms/accuracy_control/ranker.py 55.23% <100.00%> (+0.43%) ⬆️
nncf/quantization/passes.py 98.59% <100.00%> (-1.41%) ⬇️

... and 55 files with indirect coverage changes

Flag Coverage Δ
COMMON 42.73% <100.00%> (+<0.01%) ⬆️
ONNX 34.77% <85.71%> (-0.01%) ⬇️
OPENVINO ∅ <ø> (∅)
TENSORFLOW 29.65% <0.00%> (-0.01%) ⬇️
TORCH 66.01% <42.85%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
common 93.10% <ø> (-0.66%) ⬇️
torch 93.43% <ø> (+<0.01%) ⬆️
tensorflow 93.96% <ø> (ø)
onnx 93.05% <ø> (ø)
openvino 25.58% <ø> (-68.49%) ⬇️
ptq 67.31% <100.00%> (-20.43%) ⬇️

@github-actions github-actions bot added the NNCF Common Pull request that updates NNCF Common label Mar 1, 2024
@andrey-churkin andrey-churkin merged commit 0fdc629 into openvinotoolkit:develop Mar 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF Common Pull request that updates NNCF Common NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants