Skip to content

Commit

Permalink
Looser test tolerances required for GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendt Wohlberg committed Jan 23, 2025
1 parent 002f84d commit 70e050c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scico/test/linop/test_linop.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ def test_scalar_left(testobj, operator, scalar):
assert isinstance(comp_op, linop.LinearOperator) # Ensure we don't get a Map
assert comp_op.input_dtype == testobj.A.dtype
np.testing.assert_allclose(comp_mat @ testobj.x, comp_op @ testobj.x, rtol=5e-5)

np.testing.assert_allclose(comp_mat.conj().T @ testobj.y, comp_op.adj(testobj.y), rtol=5e-5)
np.testing.assert_allclose(comp_mat.conj().T @ testobj.y, comp_op.adj(testobj.y), rtol=1e-4)


@pytest.mark.parametrize("operator", [op.mul, op.truediv])
Expand Down Expand Up @@ -218,7 +217,7 @@ def test_transpose_matvec(testobj):

assert a.dtype == testobj.A.dtype
assert b.dtype == testobj.A.dtype
np.testing.assert_allclose(a, comp_mat, rtol=5e-5)
np.testing.assert_allclose(a, comp_mat, rtol=1e-4)
np.testing.assert_allclose(a, b, rtol=5e-5)


Expand Down Expand Up @@ -264,7 +263,7 @@ def test_adjoint_matvec(testobj):
assert a.dtype == testobj.A.dtype
assert b.dtype == testobj.A.dtype
assert c.dtype == testobj.A.dtype
np.testing.assert_allclose(a, comp_mat, rtol=5e-5)
np.testing.assert_allclose(a, comp_mat, rtol=1e-4)
np.testing.assert_allclose(a, b, rtol=5e-5)
np.testing.assert_allclose(a, c, rtol=5e-5)

Expand Down

0 comments on commit 70e050c

Please sign in to comment.