Skip to content

Commit a9a0204

Browse files
committed
alderlake, and don't create a project that tries to install hwloc
1 parent 6f7c35b commit a9a0204

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CPUSummary"
22
uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
33
authors = ["chriselrod <elrodc@gmail.com> and contributors"]
4-
version = "0.1.15"
4+
version = "0.1.16"
55

66
[deps]
77
Hwloc = "0e44f5e4-bd66-52a0-8798-143a42290a1d"

src/CPUSummary.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ const USE_HWLOC = @load_preference("hwloc", Sys.ARCH !== :aarch64 || !Sys.isappl
1010
use_hwloc(b) = @set_preferences!("hwloc" => b)
1111

1212
@static if USE_HWLOC
13-
tmpd = mktempdir()
1413
try
15-
p = run(`$(Base.julia_cmd()) --project=$tmpd -e'using Pkg; Pkg.add("Hwloc"); using Hwloc; Hwloc.gettopology()'`, wait=false)
14+
p = run(`$(Base.julia_cmd()) --project=$(Base.active_project()) -e'using Hwloc; Hwloc.gettopology()'`, wait=false)
1615
wait(p)
1716
if p.exitcode == 0 && p.termsignal == 0
1817
include("topology.jl")
@@ -23,8 +22,6 @@ use_hwloc(b) = @set_preferences!("hwloc" => b)
2322
catch
2423
use_hwloc(false)
2524
include("generic_topology.jl")
26-
finally
27-
rm(tmpd, recursive=true)
2825
end
2926
else
3027
include("generic_topology.jl")

src/generic_topology.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ num_l3cache() = static(1)
2323
end
2424
num_l4cache() = static(0)
2525

26-
if Sys.CPU_NAME === "tigerlake" || Sys.CPU_NAME === "icelake" || Sys.CPU_NAME === "icelake-server"
26+
if Sys.CPU_NAME === "tigerlake" || Sys.CPU_NAME === "icelake" || Sys.CPU_NAME === "icelake-server" || Sys.CPU_NAME === "alderlake"
2727
cache_size(::Union{Val{1},StaticInt{1}}) = StaticInt{49152}()
2828
elseif Sys.ARCH === :aarch64 && Sys.isapple()
2929
cache_size(::Union{Val{1},StaticInt{1}}) = StaticInt{131072}()
@@ -36,7 +36,7 @@ cache_inclusive(::Union{Val{1},StaticInt{1}}) = False()
3636

3737
if Sys.CPU_NAME === "skylake-avx512" || Sys.CPU_NAME === "cascadelake"
3838
cache_size(::Union{Val{2},StaticInt{2}}) = StaticInt{1048576}()
39-
elseif Sys.CPU_NAME === "tigerlake" || Sys.CPU_NAME === "icelake-server"
39+
elseif Sys.CPU_NAME === "tigerlake" || Sys.CPU_NAME === "icelake-server" || Sys.CPU_NAME === "alderlake"
4040
cache_size(::Union{Val{2},StaticInt{2}}) = StaticInt{1310720}()
4141
elseif occursin("zn", Sys.CPU_NAME) || occursin("icelake", Sys.CPU_NAME)
4242
cache_size(::Union{Val{2},StaticInt{2}}) = StaticInt{524288}()

0 commit comments

Comments
 (0)