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

prange() scheduling is suboptimal when workload varies between iterations #2556

Closed
seibert opened this issue Oct 3, 2017 · 1 comment · Fixed by #7625
Closed

prange() scheduling is suboptimal when workload varies between iterations #2556

seibert opened this issue Oct 3, 2017 · 1 comment · Fixed by #7625

Comments

@seibert
Copy link
Contributor

seibert commented Oct 3, 2017

When using prange() to parallelize a loop with a body that takes highly variable amounts of time per iteration, the scheduler will tend to leave some threads idle. This is because the iteration range is divided between the threads upfront to maximize chunk size. If the chunk size were smaller and fed into a work queue, it would allow better load balancing between the worker threads.

This is also likely something which becomes more efficient when we have TBB to do the thread dispatch.

See email thread: https://groups.google.com/a/continuum.io/forum/#!msg/numba-users/ZDWRtE_U2Y8/S-SbZt6YBQAJ

@anton-malakhov
Copy link
Contributor

Relates to #2245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants