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

SPEC: Improve parallel API uniformity and features across the ecosystem #13

Open
stefanv opened this issue May 7, 2024 · 2 comments
Open

Comments

@stefanv
Copy link
Member

stefanv commented May 7, 2024

See https://thomasjpfan.github.io/parallelism-python-libraries-design/

Across libraries, we should have standard mechanisms and naming for parallel concepts and features.

See also https://discuss.scientific-python.org/t/terminology-for-parameters-controlling-parallel-computation/1016/5

@betatim betatim changed the title Improve API uniformity and features across the ecosystem Improve API uniformity and features across the ecosystem related to parallelism May 7, 2024
@betatim
Copy link

betatim commented May 7, 2024

Updated the title to include "parallelism", it seemed a bit broad without it :D

@stefanv stefanv changed the title Improve API uniformity and features across the ecosystem related to parallelism Improve parallel API uniformity and features across the ecosystem May 7, 2024
@jarrodmillman jarrodmillman changed the title Improve parallel API uniformity and features across the ecosystem SPEC: Improve parallel API uniformity and features across the ecosystem May 7, 2024
@thomasjpfan
Copy link

Here are the overarching questions around a parallelism API:

  1. What should the keyword parameter be? workers, n_jobs, etc.
  2. Should it be added to every function call that does anything parallel? For example, np.linalg.matmul(..., workers=?)
  3. What to do with operators that are not function calls? A_array @ B_array is parallel. The solution is a context manager like threadpoolctl.
  4. Should libraries configure each other when it comes to parallelism? scikit-learn will prevent oversubscription with NumPy BLAS calls + joblib's n_jobs by using threadpoolctl.

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

No branches or pull requests

3 participants