From 509b10c23ad5c0785009b3adb0348e4dea5151ad Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 28 Jan 2021 08:07:30 -0800 Subject: [PATCH] increase tol --- test/test_ops.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test_ops.py b/test/test_ops.py index 4168cb3b99b..59e8ccc2c65 100644 --- a/test/test_ops.py +++ b/test/test_ops.py @@ -549,7 +549,7 @@ def _test_forward_with_batchsize(self, device, contiguous, batch_sz, dtype): out_channels = 2 kernel_size = (3, 2) groups = 2 - tol = 1e-3 if dtype is torch.half else 1e-5 + tol = 2e-3 if dtype is torch.half else 1e-5 layer = ops.DeformConv2d(in_channels, out_channels, kernel_size, stride=stride, padding=padding, dilation=dilation, groups=groups).to(device=x.device, dtype=dtype) @@ -651,7 +651,6 @@ def test_compare_cpu_cuda_grads(self): @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_autocast(self): - set_rng_seed(0) for dtype in (torch.float, torch.half): with torch.cuda.amp.autocast(): self._test_forward(torch.device("cuda"), False, dtype=dtype)