-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make @threads :dynamic
default
#44136
Make @threads :dynamic
default
#44136
Conversation
Just for future search-ability, this PR is a conclusion of the feature seeded in #35646 and implemented in #43919. PR #43919 introduced The change in the code is minimal. So, I think it can be merged once CI is sufficiently happy. |
Schedule options are: | ||
- `:static` creates one task per thread and divides the iterations equally among | ||
them, assigning each task specifically to each thread. | ||
Specifying `:static` is an error if used from inside another `@threads` loop | ||
or from a thread other than 1. | ||
- `:dynamic` will schedule iterations dynamically to available worker threads, | ||
- `:dynamic` (default) will schedule iterations dynamically to available worker threads, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the default should be listed first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense #44163
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com>
The docs on multithreading still warns that the default scheduler for @threads uses static scheduling. However, since JuliaLang#44136, dynamic scheduling has been the default. This commit removes the warning.
Follow-up to #43919
Makes the new
:dynamic
schedule forThreads.@threads
the default.