提交 aa2bb423 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Relax tolerance for GpuCumOp test

上级 f6e220a3
...@@ -32,6 +32,17 @@ class TestGpuCumOp(theano.tensor.tests.test_extra_ops.TestCumOp): ...@@ -32,6 +32,17 @@ class TestGpuCumOp(theano.tensor.tests.test_extra_ops.TestCumOp):
self.max_grid_size1 = test_ctx.maxgsize2 self.max_grid_size1 = test_ctx.maxgsize2
self.op_class = CumOp self.op_class = CumOp
# The CPU implementation is not so accurate, which throws out DebugMode.
# Since propagating .tag.values_eq_approx to the output of every
# GpuFromHost seems overkill, we just relax the rtol for these tests
self.old_rtol = theano.tensor.float32_rtol
theano.tensor.basic.float32_rtol *= 2
def tearDown(self):
super(TestGpuCumOp, self).tearDown()
# Restore rtol
theano.tensor.basic.float32_rtol = self.old_rtol
@cum_modes @cum_modes
def test_infer_shape(self, mode): def test_infer_shape(self, mode):
# GpuCumOp is only defined for float32 for now, so we skip it # GpuCumOp is only defined for float32 for now, so we skip it
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论