Commit 044e544 1 parent 36a8420 commit 044e544 Copy full SHA for 044e544
File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,18 @@ def find_quantizer_nodes_to_cut(
50
50
"""
51
51
52
52
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
-
56
53
relatives = graph .get_previous_nodes (node ) if is_parents else graph .get_next_nodes (node )
57
54
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 :
59
65
if is_parents :
60
66
if relative in seen_children :
61
67
continue
You can’t perform that action at this time.
0 commit comments