未验证 提交 26a8b5b2 编写于 作者: G Guanghua Yu 提交者: GitHub

fix QuantWeightPass error in sub graph (#50203)

上级 d09962a1
......@@ -3226,11 +3226,15 @@ class QuantWeightPass:
self._quantized_ops[x_node.name()] = quant_weight_node
for next_op_node in out_node.outputs:
graph.update_input_link(
out_node,
self._quantized_ops[x_node.name()],
next_op_node,
)
if (
self._quantized_ops[x_node.name()].node
in graph.graph.nodes()
):
graph.update_input_link(
out_node,
self._quantized_ops[x_node.name()],
next_op_node,
)
graph.safe_remove_nodes(_op)
self._remove_unused_var_nodes(graph)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册