From 59d88da06ef4bb33f820854b6888b23a6e7ddd67 Mon Sep 17 00:00:00 2001 From: Eric Lunderberg Date: Wed, 11 Aug 2021 10:25:39 -0500 Subject: [PATCH 1/2] [UnitTest] Updated tolerances to avoid flaky unit test. The result was correct, but the atol was just small enough to trigger a CI error for a value that was close to zero in an unrelated PR at #8670. https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-8670/16/pipeline/#step-236-log-1703 --- .../python/relay/test_auto_scheduler_layout_rewrite_networks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python/relay/test_auto_scheduler_layout_rewrite_networks.py b/tests/python/relay/test_auto_scheduler_layout_rewrite_networks.py index 5b0125b452c5..dd3126a09810 100644 --- a/tests/python/relay/test_auto_scheduler_layout_rewrite_networks.py +++ b/tests/python/relay/test_auto_scheduler_layout_rewrite_networks.py @@ -179,7 +179,7 @@ def get_output(data, lib): actual_output = get_output(data, lib) expected_output = get_output(data, lib2) - tvm.testing.assert_allclose(actual_output, expected_output, rtol=1e-4, atol=1e-4) + tvm.testing.assert_allclose(actual_output, expected_output, rtol=1e-4, atol=2e-4) def test_conv2d(): From 502cf45ef9ad7279d86e66b1d9d9a14d4cc7a75a Mon Sep 17 00:00:00 2001 From: Eric Lunderberg Date: Wed, 11 Aug 2021 16:43:15 -0500 Subject: [PATCH 2/2] Also updated 32-bit version of test_conv2d_nchw --- tests/python/topi/python/test_topi_conv2d_nchw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python/topi/python/test_topi_conv2d_nchw.py b/tests/python/topi/python/test_topi_conv2d_nchw.py index 5cc8bb0a1de7..96a7ff9b926c 100644 --- a/tests/python/topi/python/test_topi_conv2d_nchw.py +++ b/tests/python/topi/python/test_topi_conv2d_nchw.py @@ -142,7 +142,7 @@ def test_conv2d_nchw( if "int" in dtype: tol = {"atol": 0, "rtol": 0} elif dtype == "float32": - tol = {"rtol": 1e-4, "atol": 1e-4} + tol = {"rtol": 1e-4, "atol": 2e-4} elif dtype == "float16": # A summation in float16 with a single accumulator very # quickly runs into large rounding errors. At some point,