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

Fix bug in tests and avoid variability in numerical precision across devices #545

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scico/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
from . import numpy
from ._autograd import cvjp, grad, jacrev, linear_adjoint, value_and_grad

# See https://github.com/google/jax/issues/19444
jax.config.update("jax_default_matmul_precision", "highest")

__all__ = [
"grad",
"value_and_grad",
Expand Down
7 changes: 6 additions & 1 deletion scico/test/linop/xray/test_astra.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
from scico.test.linop.xray.test_svmbir import make_im

try:
from scico.linop.xray.astra import XRayTransform2D, XRayTransform3D, angle_to_vector
from scico.linop.xray.astra import (
XRayTransform2D,
XRayTransform3D,
_ensure_writeable,
angle_to_vector,
)
except ModuleNotFoundError as e:
if e.name == "astra":
pytest.skip("astra not installed", allow_module_level=True)
Expand Down
Loading