10000 Cache repeated calls to cpu_count. by ogrisel · Pull Request #15 · ogrisel/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Cache repeated calls to cpu_count. #15

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

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

ogrisel
Copy link
Owner
@ogrisel ogrisel commented Apr 4, 2023

@jeremiedbb
Copy link

I just remembered that loky does cache the number of physical cores. And at the time I even wrote a comment saying that it should not change during the lifetime of a program. Unfortunately it doesn't cache the total number of cores.
So I'm in favor of extending the cache for both cpu counts in loky, and to add the cache mechanism in scikit-learn at the same time.

@ogrisel
Copy link
Owner Author
ogrisel commented Apr 5, 2023

@jeremiedbb I updated the PR.

@ogrisel ogrisel merged commit 68d86ef into openmp-only-physical-cores-true-by-default Apr 5, 2023
@ogrisel ogrisel deleted the cache-cpu_count branch April 5, 2023 16:48
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.

2 participants
0