提交 ac079830 authored 作者: Frederic Bastien's avatar Frederic Bastien

Do not duplicate mul/add in local_add_mul_fusion. This still happen in Canonizer.

上级 75fa1ff0
......@@ -7180,7 +7180,9 @@ def local_add_mul_fusion(node):
for inp in node.inputs:
if (inp.owner and
isinstance(inp.owner.op, Elemwise) and
isinstance(inp.owner.op.scalar_op, s_op)):
isinstance(inp.owner.op.scalar_op, s_op) and
# Do not duplicate the operation.
len(inp.clients) == 1):
new_inp.extend(inp.owner.inputs)
fused = True
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论