提交 6efef55a authored 作者: Frederic Bastien's avatar Frederic Bastien

make the new opt work for in put of the graph and constant.

上级 1e481c32
......@@ -687,7 +687,11 @@ def local_alloc_elemwise(node):
no_broad_idx = -1
for idx,i in enumerate(node.inputs):
if not i.owner:
continue
if list(i.type.broadcastable) == [False,]*i.type.ndim:
no_broad_idx = idx
break
else:
continue
if not any(i.type.broadcastable) and not isinstance(i.owner.op, T.Alloc):
no_broad_idx = idx
break
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论