提交 bf9c924d authored 作者: Frederic's avatar Frederic

Fix rare compilation crash

上级 ead42e86
...@@ -2526,6 +2526,10 @@ def local_reshape_lift(node): ...@@ -2526,6 +2526,10 @@ def local_reshape_lift(node):
len(node.inputs[0].owner.inputs) == 1): len(node.inputs[0].owner.inputs) == 1):
r = node.op(node.inputs[0].owner.inputs[0], node.inputs[1]) r = node.op(node.inputs[0].owner.inputs[0], node.inputs[1])
e = node.inputs[0].owner.op(r) e = node.inputs[0].owner.op(r)
# In rare case the original broadcast was (False, True), but
# the new one is (False, False). So don't crash in that case.
if e.type != node.outputs[0].type:
e = T.patternbroadcast(e, node.outputs[0].broadcastable)
return [e] return [e]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论