Skip to content

Commit 30316cd

Browse files
roman-janik-nxprobert-kalmar
authored andcommitted
NXP backend: Fix _has_shared_q_params_if_quantized in Node converter
1 parent 9614a3f commit 30316cd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

backends/nxp/backend/ir/converter/node_converter.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,8 @@ def _has_shared_q_params_if_quantized(node: Node) -> bool:
132132
# Some exotic operator (only consumer or only produces)
133133
return True
134134

135-
pre_node = node.prev
136-
post_node = node.next
137-
138-
if pre_node.name == node.all_input_nodes[0] and post_node.name == node.users[0]:
139-
raise RuntimeError(
140-
"Prev & next nodes are not the same as inputs and outputs."
141-
)
135+
pre_node = node.all_input_nodes[0]
136+
post_node = list(node.users)[0]
142137

143138
if _is_dequant_node(pre_node) and _is_quant_node(post_node):
144139
# Node is quantized

0 commit comments

Comments
 (0)