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

Make cheap comparison earlier. This make an scan opt from 4s to 1.Xs.

上级 463c13e7
......@@ -405,6 +405,8 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None):
if x.owner: # Check above tell that y.owner eval to True too.
if x.owner.outputs.index(x) != y.owner.outputs.index(y):
return False
if x not in in_xs and x.type != y.type:
return False
if len(in_xs) != len(in_ys):
return False
for _x, _y in izip(in_xs, in_ys):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论