You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just opened JuliaLang/Distributed.jl#67 to ask for better Julia support for a scenario where one has multiple worker processes, where each has multiple threads.
In such a scenario, it would be useful to have a dtreduce function which works across all the threads across all the worker processes. This would be different from dreduce which only uses one thread in each worker process.
It would probably be advisable to keep the current behavior of dreduce to keep it compatible with @distributed and pmap. Keeping the ability to have one per-process reducers is usefull, for example if the invoke @threads internally.
The text was updated successfully, but these errors were encountered:
This is already implemented in JuliaLang/julia#133. It'll be in the next release. You can pass threads_basesize = typemax(Int) if you don't want to use threads.
Keeping the ability to have one per-process reducers is usefull, for example if the invoke @threads internally.
This is not necessary because Julia's scheduler is depth-first: https://julialang.org/blog/2019/07/multithreading If you use @threads inside (e.g.) f of Map(f) then it will automatically use multiple cores.
Though this may be a good idea if you use external libraries that are not aware of Julia's scheduler. JuliaLang/julia#32786
I just opened JuliaLang/Distributed.jl#67 to ask for better Julia support for a scenario where one has multiple worker processes, where each has multiple threads.
In such a scenario, it would be useful to have a
dtreduce
function which works across all the threads across all the worker processes. This would be different fromdreduce
which only uses one thread in each worker process.It would probably be advisable to keep the current behavior of
dreduce
to keep it compatible with@distributed
andpmap
. Keeping the ability to have one per-process reducers is usefull, for example if the invoke@threads
internally.The text was updated successfully, but these errors were encountered: