Skip to content

Commit

Permalink
Bump some SVD test tolerances.
Browse files Browse the repository at this point in the history
These just barely fail on recent TPUs.

PiperOrigin-RevId: 652571985
  • Loading branch information
hawkinsp authored and jax authors committed Jul 15, 2024
1 parent 5d33929 commit 2f45cd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/linalg_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ def f(x):
if dtype == np.complex128:
atol = 2e-13
else:
atol = 5e-4
atol = 6e-4
self.assertArraysAllClose(t_out, b.real, atol=atol)

def testJspSVDBasic(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/svd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def testSvdWithOnRankDeficientInputZeroColumns(self, m, r):
np.testing.assert_almost_equal(diff, 1e-4, decimal=2)
# Check that u and v are orthogonal.
self.assertAllClose(u.T.conj() @ u, np.eye(m), atol=10 * _SVD_TEST_EPS)
self.assertAllClose(v.T.conj() @ v, np.eye(m), atol=10 * _SVD_TEST_EPS)
self.assertAllClose(v.T.conj() @ v, np.eye(m), atol=11 * _SVD_TEST_EPS)

@jtu.sample_product(
[dict(m=m, n=n) for m, n in zip([2, 8, 10, 20], [4, 6, 10, 18])],
Expand Down

0 comments on commit 2f45cd7

Please sign in to comment.