-
Notifications
You must be signed in to change notification settings - Fork 19
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 cpu kind information available #80
Conversation
On Mac mini M1 (4 efficiency and 4 performance cores) julia> using Hwloc
julia> num_cpukinds()
2
julia> num_virtual_cores_cpukinds()
2-element Vector{Int64}:
4
4
julia> Hwloc.get_cpukind_info()
2-element Vector{Union{Nothing, @NamedTuple{masks::Vector{UInt64}, efficiency_rank::Int32, infos::Vector{Hwloc.HwlocInfo}}}}:
(masks = UInt64[0x000000000000000f], efficiency_rank = 0, infos = Hwloc.HwlocInfo[Hwloc.HwlocInfo("DarwinCompatible", "apple,icestorm;ARM,v8")])
(masks = UInt64[0x00000000000000f0], efficiency_rank = 1, infos = Hwloc.HwlocInfo[Hwloc.HwlocInfo("DarwinCompatible", "apple,firestorm;ARM,v8")]) Integration into julia> topology(; cpukind=true)
Machine (3.49 GB)
Package L#0 P#0 (3.49 GB)
NUMANode (3.49 GB)
L2 (4.0 MB)
L1 (64.0 kB) + Core L#0 P#0
PU L#0 P#0 (1, DarwinCompatible=apple,icestorm;ARM,v8)
L1 (64.0 kB) + Core L#1 P#1
PU L#1 P#1 (1, DarwinCompatible=apple,icestorm;ARM,v8)
L1 (64.0 kB) + Core L#2 P#2
PU L#2 P#2 (1, DarwinCompatible=apple,icestorm;ARM,v8)
L1 (64.0 kB) + Core L#3 P#3
PU L#3 P#3 (1, DarwinCompatible=apple,icestorm;ARM,v8)
L2 (12.0 MB)
L1 (128.0 kB) + Core L#4 P#4
PU L#4 P#4 (2, DarwinCompatible=apple,firestorm;ARM,v8)
L1 (128.0 kB) + Core L#5 P#5
PU L#5 P#5 (2, DarwinCompatible=apple,firestorm;ARM,v8)
L1 (128.0 kB) + Core L#6 P#6
PU L#6 P#6 (2, DarwinCompatible=apple,firestorm;ARM,v8)
L1 (128.0 kB) + Core L#7 P#7
PU L#7 P#7 (2, DarwinCompatible=apple,firestorm;ARM,v8)
CoProc(OpenCL) "opencl0d0" |
|
I think this is ready for review/merge. (I apologize for the formatting changes in advance 😄.) I've tested this on a cluster (single kind of CPU cores) and a M1 mac Mini (two kinds of CPU cores). |
@giordano Can you perhaps run |
I don't have access to Fugaku anymore 😢 |
There seems to be a problem on Perlmutter: julia> topology(; cpukind=true)
Machine (503.14 GB)
Package L#0 P#0 (251.18 GB)
Group (62.21 GB)
NUMANode (62.21 GB)
L3 (32.0 MB)
L2 (512.0 kB) + L1 (32.0 kB) + Core L#0 P#0 ERROR: type Nothing has no field masks
Stacktrace:
[1] getproperty(x::Nothing, f::Symbol)
@ Base ./Base.jl:37
[2] _osindex2cpukind(i::Int64)
@ Hwloc ~/.julia/dev/Hwloc/src/highlevel_api.jl:469
[3]
@ Hwloc ~/.julia/dev/Hwloc/src/highlevel_api.jl:77
[4]
@ Hwloc ~/.julia/dev/Hwloc/src/highlevel_api.jl:159
[5] (repeats 2 times)
@ Hwloc ~/.julia/dev/Hwloc/src/highlevel_api.jl:154
[6] (repeats 4 times)
@ Hwloc ~/.julia/dev/Hwloc/src/highlevel_api.jl:159
[7] print_topology(obj::Hwloc.Object; kwargs::@Kwargs{cpukind::Bool})
@ Hwloc ~/.julia/dev/Hwloc/src/highlevel_api.jl:175
[8] print_topology
@ ~/.julia/dev/Hwloc/src/highlevel_api.jl:175 [inlined]
[9] topology
@ ~/.julia/dev/Hwloc/src/highlevel_api.jl:198 [inlined]
[10] top-level scope
@ REPL[7]:1
Some type information was truncated. Use `show(err)` to see complete types. Which seems to stem from the fact that the cpukind info is empty: julia> num_cpukinds()
1
julia>
julia> num_virtual_cores_cpukinds()
julia> Hwloc.get_cpukind_info()
1-element Vector{Union{Nothing, @NamedTuple{masks::Vector{UInt64}, efficiency_rank::Int32, infos::Vector{Hwloc.HwlocInfo}}}}:
nothing Any thoughts? |
@JBlaschke Fixed (tested on a Perlmutter login node). Apparently hwloc can't obtain the CPU kind information on Perlmutter and my handling of this case was flawed. |
(The CI failure seems to be a unrelated hickup) |
On an Intel 12900K (8 performance cores, 8 efficiency cores),
|
That looks nice / as expected. Thanks for testing @robertschade! |
Thanks! Do you know why this information isn't available on PM? We've got normal AMD Milan CPUs there... |
No idea, hwloc is my abstraction and it doesn't provide it ( |
FYI: I plan to merge this tomorrow. |
Ok so that's probably our fault then -- I'll follow up internatlly.
Brilliant! Thanks for your work on this :) |
Use case: Distinguishing efficiency and performance cores.
num_cpukinds()
num_virtual_cores_cpukinds()
topology()
?Close #57