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

Warn about JAX bitsize changes #504

Merged
merged 2 commits into from
Jun 15, 2023
Merged

Conversation

Lnaden
Copy link
Contributor

@Lnaden Lnaden commented Jun 15, 2023

Partial solution to #496

This PR changes the timing of setting JAX 64-bit mode to right at first call of a JIT'd function rather than on import. A warning is issued if 32-bit mode JAX is detected on import, and a second warning is issued when the mode is first toggled.

Code functionality is overall not changed.

The JIT or Passthrough decorator is wrapped inside a different function to check the config on call.

Fixes choderalab#496

This PR changes the timing of setting JAX 64-bit mode to right at first call of a JIT'd function rather than on import. A warning is issued if 32-bit mode JAX is detected on import, and a second warning is issued when the mode is first toggled.

Code functionality is overall not changed.

The JIT or Passthrough decorator is wrapped inside a different function to check the config on call.
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #504 (dc29e7d) into master (dcc6b6d) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@Lnaden Lnaden merged commit a5fa114 into choderalab:master Jun 15, 2023
@Lnaden Lnaden deleted the jax-64-warning branch June 15, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant