Skip to content

Commit 5ab280c

Browse files
lower atol on tests when floatX == float32
1 parent 1470835 commit 5ab280c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/tensor/rewriting/test_linalg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_tag_solve_triangular():
106106
assert not any(isinstance(op, Solve) for op in op_list)
107107
assert any(isinstance(op, SolveTriangular) for op in op_list)
108108

109-
assert_allclose(f(X, eye) @ X_chol, eye, atol=1e-8)
109+
assert_allclose(f(X, eye) @ X_chol, eye, atol=1e-8 if config.floatX.endswith('64') else 1e-4)
110110

111111
f = pytensor.function([A, x], b2)
112112

@@ -115,7 +115,7 @@ def test_tag_solve_triangular():
115115
op_list = [node.op for node in toposort]
116116
assert not any(isinstance(op, Solve) for op in op_list)
117117
assert any(isinstance(op, SolveTriangular) for op in op_list)
118-
assert_allclose(f(X, eye).T @ X_chol, eye, atol=1e-8)
118+
assert_allclose(f(X, eye).T @ X_chol, eye, atol=1e-8 if config.floatX.endswith('64') else 1e-4)
119119

120120

121121
def test_matrix_inverse_solve():

0 commit comments

Comments
 (0)