未验证 提交 4875b972 编写于 作者: C cc 提交者: GitHub

Fix bug of supporting channelwise dygraph quantized model, test=develop (#30531) (#30545)

上级 420fdbb2
...@@ -154,8 +154,7 @@ class Quant2Int8MkldnnPass(object): ...@@ -154,8 +154,7 @@ class Quant2Int8MkldnnPass(object):
is_quantized_op = True is_quantized_op = True
for var_node in op_node.inputs: for var_node in op_node.inputs:
for front_op_node in var_node.inputs: for front_op_node in var_node.inputs:
if "fake_quantize_dequantize_" not in front_op_node.name( if "quantize_dequantize" not in front_op_node.name():
):
is_quantized_op = False is_quantized_op = False
if not is_quantized_op: if not is_quantized_op:
op_node.op()._set_attr("skip_quant", True) op_node.op()._set_attr("skip_quant", True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册