提交 77d2f918 authored 作者: Frederic's avatar Frederic

Fix DotTester.test_good in debugmode, make *allocempty accept non finite value

上级 7c7c4b8f
......@@ -3535,6 +3535,9 @@ class GpuAllocEmpty(GpuOp):
def make_node(self, *shape):
shape, output = self.validate_shape(shape)
output.tag.values_eq_approx = tensor.type.values_eq_approx_always_true
# The outut can contain nan/inf. output.type is a new
# instance, so we can do this only for that variable.
output.type.filter_checks_isfinite = False
return Apply(self, shape, [output])
def perform(self, node, inputs, out_):
......
......@@ -713,6 +713,8 @@ class GpuAllocEmpty(HideC, Alloc):
sh, bcast = self.validate_shape(shape)
output = GpuArrayType(dtype=self.dtype, broadcastable=bcast)()
output.tag.values_eq_approx = tensor.type.values_eq_approx_always_true
# The outut can contain nan/inf.
output.type.filter_checks_isfinite = False
return Apply(self, sh, [output])
def perform(self, node, inputs, out_):
......
......@@ -5709,6 +5709,9 @@ class AllocEmpty(gof.Op):
def make_node(self, *shape):
shape, output = self.validate_shape(shape)
output.tag.values_eq_approx = values_eq_approx_always_true
# The outut can contain nan/inf. output.type is a new
# instance, so we can do this only for that variable.
output.type.filter_checks_isfinite = False
return Apply(self, shape, [output])
def perform(self, node, inputs, out_):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论