Skip to content

Commit 044e544

Browse files
Fix AAQ propagation (#3127)
### Changes - Fixed AAQ algo propagation for quantizable types. ### Reason for changes - Bugfix. ### Related tickets - #3118 ### Tests - TBD
1 parent 36a8420 commit 044e544

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

nncf/common/quantization/quantizer_removal.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,18 @@ def find_quantizer_nodes_to_cut(
5050
"""
5151

5252
def _parse_node_relatives(node: NNCFNode, is_parents: bool):
53-
if node.metatype in quantizable_metatypes:
54-
ops_to_return_in_orig_prec.add(node)
55-
5653
relatives = graph.get_previous_nodes(node) if is_parents else graph.get_next_nodes(node)
5754
for relative in relatives:
58-
if relative.metatype in quantizer_metatypes:
55+
if relative.metatype in quantizable_metatypes:
56+
if is_parents:
57+
if relative in seen_children:
58+
continue
59+
to_see_children.append(relative)
60+
else:
61+
ops_to_return_in_orig_prec.add(relative)
62+
if relative not in seen_parents:
63+
to_see_parents.append(relative)
64+
elif relative.metatype in quantizer_metatypes:
5965
if is_parents:
6066
if relative in seen_children:
6167
continue

0 commit comments

Comments
 (0)