Skip to content

Commit

Permalink
Make the implementation of Log/Log2/Ln/Log1p in XLA accurate on all p…
Browse files Browse the repository at this point in the history
…latforms, and tighten test tolerances accordingly. Add tests for +/-0, +/-inf, and NaN.

PiperOrigin-RevId: 504022808
  • Loading branch information
jax authors committed Jan 28, 2023
1 parent a297092 commit 22764d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/lax_numpy_test.py
Expand Up @@ -5090,8 +5090,9 @@ def testOpGrad(self, op, rng_factory, shapes, dtype, order, tol):
)
for rec in GRAD_SPECIAL_VALUE_TEST_RECORDS))
def testOpGradSpecialValue(self, op, special_value, order):
check_grads(op, (special_value,), order, ["fwd", "rev"],
atol={np.float32: 3e-3})
check_grads(
op, (special_value,), order, ['fwd', 'rev'], atol={np.float32: 4e-3}
)

def testSincAtZero(self):
# Some manual tests for sinc at zero, since it doesn't have well-behaved
Expand Down

0 comments on commit 22764d3

Please sign in to comment.