Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

further relax jax linalg_test test tolerance #17095

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ exts_list = [
],
'checksums': [
'225624375094d2067bc3af5abe0a73c6b530916edc1422c30a451d3f3e1b5a82', # jax-v0.3.14.tar.gz
'3da3c8b4d9ff3449b51a4f39d6bbadd348ea3bd4ca493a6f1292743f86fa7b3d', # jax-0.3.9_relax-test-tolerance.patch
'0584ce47d7baeed25475a118af6adc57ca697ae853ca4e50bd373e72be2f2e1a', # jax-0.3.9_relax-test-tolerance.patch
# jax-0.3.14_relax-test-tolerances.patch
'387e98a89ca03ca898a1925d7c2d57d0568f6a72b0cb516469903dddd9424689',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ exts_list = [
'checksums': [
{'jax-v0.3.23.tar.gz': 'fa8c68a82fa2fcf3d272bf239c77e7028bb6077466a53349ce85f6e85ed623db'},
{'jax-0.3.9_relax-test-tolerance.patch':
'3da3c8b4d9ff3449b51a4f39d6bbadd348ea3bd4ca493a6f1292743f86fa7b3d'},
'0584ce47d7baeed25475a118af6adc57ca697ae853ca4e50bd373e72be2f2e1a'},
{'jax-0.3.23_correctly-skip-from_dlpack-tests.patch':
'a69ce7280ca8bb42e671217f00d9147f8c64b4b7ba65dea7f05f2c6de757b279'},
{'jax-0.3.23_relax-testPoly5-tolerance.patch':
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyconfigs/j/jax/jax-0.3.23-foss-2022a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ exts_list = [
'checksums': [
{'jax-v0.3.23.tar.gz': 'fa8c68a82fa2fcf3d272bf239c77e7028bb6077466a53349ce85f6e85ed623db'},
{'jax-0.3.9_relax-test-tolerance.patch':
'3da3c8b4d9ff3449b51a4f39d6bbadd348ea3bd4ca493a6f1292743f86fa7b3d'},
'0584ce47d7baeed25475a118af6adc57ca697ae853ca4e50bd373e72be2f2e1a'},
{'jax-0.3.23_correctly-skip-from_dlpack-tests.patch':
'a69ce7280ca8bb42e671217f00d9147f8c64b4b7ba65dea7f05f2c6de757b279'},
{'jax-0.3.23_relax-testPoly5-tolerance.patch':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ exts_list = [
'45c526496d525fd04c0c9c705971f4cfa31e6a9f7d25e55a4e3bdcb3a4bbe6ce', # jax-v0.3.9.tar.gz
# jax-0.2.19_fix-update-of-cache-access-time.patch
'e20562f67d63cc7e3478f7a92940291b2c8e328d605426bbabf89d8c2e1dd806',
'3da3c8b4d9ff3449b51a4f39d6bbadd348ea3bd4ca493a6f1292743f86fa7b3d', # jax-0.3.9_relax-test-tolerance.patch
'0584ce47d7baeed25475a118af6adc57ca697ae853ca4e50bd373e72be2f2e1a', # jax-0.3.9_relax-test-tolerance.patch
],
# deliberately not testing in parallel, as that results in (additional) failing tests;
# use XLA_PYTHON_CLIENT_ALLOCATOR=platform to allocate and deallocate GPU memory during testing,
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyconfigs/j/jax/jax-0.3.9-foss-2021a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ exts_list = [
'45c526496d525fd04c0c9c705971f4cfa31e6a9f7d25e55a4e3bdcb3a4bbe6ce', # jax-v0.3.9.tar.gz
# jax-0.2.19_fix-update-of-cache-access-time.patch
'e20562f67d63cc7e3478f7a92940291b2c8e328d605426bbabf89d8c2e1dd806',
'3da3c8b4d9ff3449b51a4f39d6bbadd348ea3bd4ca493a6f1292743f86fa7b3d', # jax-0.3.9_relax-test-tolerance.patch
'0584ce47d7baeed25475a118af6adc57ca697ae853ca4e50bd373e72be2f2e1a', # jax-0.3.9_relax-test-tolerance.patch
],
'runtest': "pytest -n %(parallel)s tests",
}),
Expand Down
18 changes: 15 additions & 3 deletions easybuild/easyconfigs/j/jax/jax-0.3.9_relax-test-tolerance.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
Relax tolerance for tests/linalg_test.py::NumpyLinalgTest::testQr0
Which gives norm=152.9272003173828 (out of 140) on AMD Epyc 7402
Patch by Alexandre Strube (Helmholtz AI/Juelich Supercomputing Centre)
Relax tolerance for tests/linalg_test.py::ScipyLinalgTest::testLu_shape=float64[50,50]
which failes by a small amount on AMD Rome
Patch by Simon Branford (University of Birmingham)
--- tests/linalg_test.py.orig 2022-06-21 19:05:51.211914000 +0100
+++ tests/linalg_test.py 2022-06-21 19:10:57.704763179 +0100
@@ -1031,8 +1031,9 @@
--- tests/linalg_test.py.orig 2022-10-12 17:23:43.000000000 +0200
+++ tests/linalg_test.py 2023-01-12 18:24:58.706838703 +0100
@@ -667,7 +667,7 @@
phases = np.divide(sum_of_ratios, np.abs(sum_of_ratios))
q1 *= phases
nm = norm(q1 - q2)
- self.assertTrue(np.all(nm < 140), msg=f"norm={np.amax(nm)}")
+ self.assertTrue(np.all(nm < 160), msg=f"norm={np.amax(nm)}")

# Check a ~= qr
self.assertTrue(np.all(norm(a - np.matmul(lq, lr)) < 40))
@@ -984,8 +984,9 @@
x, = args_maker()
p, l, u = jsp.linalg.lu(x)
self.assertAllClose(x, np.matmul(p, np.matmul(l, u)),
Expand Down