Skip to content

Commit

Permalink
Fix AAQ propagation (#3127)
Browse files Browse the repository at this point in the history
### Changes

- Fixed AAQ algo propagation for quantizable types.

### Reason for changes

- Bugfix.

### Related tickets

- #3118

### Tests

- TBD
  • Loading branch information
KodiaqQ authored Dec 13, 2024
1 parent 36a8420 commit 044e544
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions nncf/common/quantization/quantizer_removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ def find_quantizer_nodes_to_cut(
"""

def _parse_node_relatives(node: NNCFNode, is_parents: bool):
if node.metatype in quantizable_metatypes:
ops_to_return_in_orig_prec.add(node)

relatives = graph.get_previous_nodes(node) if is_parents else graph.get_next_nodes(node)
for relative in relatives:
if relative.metatype in quantizer_metatypes:
if relative.metatype in quantizable_metatypes:
if is_parents:
if relative in seen_children:
continue
to_see_children.append(relative)
else:
ops_to_return_in_orig_prec.add(relative)
if relative not in seen_parents:
to_see_parents.append(relative)
elif relative.metatype in quantizer_metatypes:
if is_parents:
if relative in seen_children:
continue
Expand Down

0 comments on commit 044e544

Please sign in to comment.