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

Moved finfo _finfo_cache initialization at class creation level #192

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

vfdev-5
Copy link
Contributor

@vfdev-5 vfdev-5 commented Sep 13, 2024

Description:

  • Moved finfo _finfo_cache initialization at class creation level

to avoid concurrency problems in the finfo cache, we should just preconstruct all the entries during module initialization, rather than on demand.

cc @hawkinsp

@jakevdp
Copy link
Collaborator

jakevdp commented Sep 13, 2024

We need to re-enable the multi threading tests before we can really test this.

The 0.5.0 release is in progress here: #194; just waiting on CI

Copy link
Collaborator

@hawkinsp hawkinsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; one small change.

ml_dtypes/_finfo.py Outdated Show resolved Hide resolved
@copybara-service copybara-service bot merged commit b65a1f6 into jax-ml:main Sep 16, 2024
13 checks passed
@vfdev-5 vfdev-5 deleted the fix-_finfo_cache-init branch September 16, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants