提交 8ac8342d authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Fix overly strict check in `local_pow_specialize` rewrite

上级 44591993
......@@ -2072,11 +2072,10 @@ def local_pow_specialize(fgraph, node):
if np.all(y == -2):
rval = [reciprocal(sqr(xsym))]
if rval:
if not rval[0].type.broadcastable == node.outputs[0].type.broadcastable:
return None
rval[0] = cast(rval[0], odtype)
assert rval[0].type.is_super(node.outputs[0].type), (
rval[0].type,
node.outputs[0].type,
)
assert rval[0].type.dtype == node.outputs[0].type.dtype
return rval
else:
return False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论