Open carstenbauer opened 1 year ago
Thanks for the contribution. I guess having something in PS for the Threads backend to control pinning and threads to cores mapping (or have an close to optimal default solution) would be great! Especially for AMD cpus with many NUMA regions where this becomes significant.
BTW, @omlins, depending on how easy/difficult it would be to give me test access to Piz Daint I could run some benchmarks there as well.
@carstenbauer, as Ludovic told you probably already, Piz Daint does not have any AMD CPUs. Thus, for testing this Superzack, Ludovic's cluster, will be better.
I quickly tested another example, namely https://github.com/omlins/ParallelStencil.jl/blob/main/miniapps/acoustic3D.jl (with the visualization/animation part commented out. Same configuration as above, i.e. a 64 core node of Noctua 2 with 64 Julia threads that I pinned compactly. Below are the timings of the acoustic3D()
function before and with this PR.
# Before PR: 44.315157 seconds (779.52 k allocations: 840.038 MiB, 1.09% gc time)
# With PR: 18.557505 seconds (791.20 k allocations: 840.475 MiB, 2.71% gc time)
This corresponds to about a 2.4x speedup. (cc @luraess)
This relates also to https://github.com/omlins/ParallelStencil.jl/issues/53#issuecomment-1086978245
What's holding back merging this?
Bump
@omlins bump
For better performance on systems with multiple NUMA domains. See my extensive comment on discourse.
With this PR, I get about 40% speedup for this example (with
USE_GPU=false
) when using a full AMD Zen3 CPU (64 cores, 4 NUMA domains) of Noctua 2.Timings (s) before
Timings (s) after
Speedup in %
NOTES:
@zeros
and co, analyze its structure and then initialize "accordingly". But that's difficult...)cc @luraess @omlins
PS: Working on it at the GPU4GEO Hackathon in the Schwarzwald 😉