提交 8b6e8b23 authored 作者: Frederic Bastien's avatar Frederic Bastien

fuse more case that don't duplicate computation.

上级 a093a2fc
...@@ -1278,10 +1278,6 @@ def local_elemwise_fusion(node): ...@@ -1278,10 +1278,6 @@ def local_elemwise_fusion(node):
s_inputs.extend(s_input) s_inputs.extend(s_input)
s_g.append(s_op) s_g.append(s_op)
else: else:
if i.owner and isinstance(i.owner.op,T.Elemwise) and len(i.clients)>1:
#should we put this in the first if, then we would go to the elif to don't fuse it?
print "local_elemwise_fusion: inputs have more then 1 client. Don't fuse it for now.!"
return False
inputs.append(i) inputs.append(i)
s=scalar.Scalar(i.dtype).make_variable() s=scalar.Scalar(i.dtype).make_variable()
s_inputs.append(s) s_inputs.append(s)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论