Skip to content

Commit

Permalink
Improve tol to resolve flaky case (apache#4836)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored Feb 7, 2020
1 parent 75e9f5d commit e578777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions topi/tests/python/test_topi_pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def check_device(device):
b = tvm.nd.array(np.zeros(get_const_tuple(B.shape), dtype=dtype), ctx)
f = tvm.build(s, [A, B], device)
f(a, b)
tvm.testing.assert_allclose(b.asnumpy(), b_np, rtol=1e-5)
tvm.testing.assert_allclose(b.asnumpy(), b_np, rtol=2e-5, atol=1e-5)

for device in get_all_backend():
check_device(device)
Expand Down Expand Up @@ -180,7 +180,7 @@ def test_pool_grad():

def verify_global_pool(n, c, h, w, pool_type, layout='NCHW'):

assert layout in ["NCHW", "NHWC"]
assert layout in ["NCHW", "NHWC"]
A = tvm.placeholder((n, c, h, w), name='A')
B = topi.nn.global_pool(A, pool_type=pool_type, layout=layout)
B = topi.nn.relu(B)
Expand Down

0 comments on commit e578777

Please sign in to comment.