Skip to content

Commit

Permalink
Relax test tolerance to fix a test failure on ARM CPU.
Browse files Browse the repository at this point in the history
Relax a test tolerance to fix a test failure with AVX enabled on a TPU host.

PiperOrigin-RevId: 669233976
  • Loading branch information
hawkinsp authored and jax authors committed Aug 30, 2024
1 parent 6278ffa commit 283770a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/linalg_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def testEigvals(self, shape, dtype):
a, = args_maker()
w1, _ = jnp.linalg.eig(a)
w2 = jnp.linalg.eigvals(a)
self.assertAllClose(w1, w2, rtol={np.complex64: 1e-5, np.complex128: 1e-14})
self.assertAllClose(w1, w2, rtol={np.complex64: 1e-5, np.complex128: 2e-14})

@jtu.run_on_devices("cpu")
def testEigvalsInf(self):
Expand Down Expand Up @@ -489,7 +489,7 @@ def testEighRankDeficient(self, rank):
with jax.numpy_rank_promotion("allow"):
self.assertLessEqual(
np.linalg.norm(np.matmul(a, v) - w * v),
81 * eps * np.linalg.norm(a),
85 * eps * np.linalg.norm(a),
)

@jtu.sample_product(
Expand Down

0 comments on commit 283770a

Please sign in to comment.