Skip to content

Commit

Permalink
Asahi
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Sep 14, 2023
1 parent 892d545 commit 5b9b3c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CPUSummary"
uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
authors = ["chriselrod <[email protected]> and contributors"]
version = "0.2.3"
version = "0.2.4"

[deps]
CpuId = "adafc99b-e345-5852-983c-f28acb93d879"
Expand Down
13 changes: 8 additions & 5 deletions src/generic_topology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
end
num_l4cache() = static(0)

if Sys.ARCH === :aarch64 && Sys.isapple()
if Sys.ARCH === :aarch64 && (Sys.isapple() || occursin("apple", Sys.CPU_NAME::String))
cache_size(::Union{Val{1},StaticInt{1}}) = StaticInt{131072}()
else
cache_size(::Union{Val{1},StaticInt{1}}) = StaticInt{32768}()
Expand All @@ -27,22 +27,25 @@ cache_associativity(::Union{Val{1},StaticInt{1}}) = StaticInt{0}()
cache_type(::Union{Val{1},StaticInt{1}}) = Val{:Data}()
cache_inclusive(::Union{Val{1},StaticInt{1}}) = False()

if Sys.ARCH === :aarch64 && Sys.isapple()
if Sys.ARCH === :aarch64 && (Sys.isapple() || occursin("apple", Sys.CPU_NAME::String))
cache_size(::Union{Val{2},StaticInt{2}}) = StaticInt{3145728}()
else
cache_size(::Union{Val{2},StaticInt{2}}) = StaticInt{65536}()
end
cache_associativity(::Union{Val{2},StaticInt{2}}) = StaticInt{0}()
cache_type(::Union{Val{2},StaticInt{2}}) = Val{:Unified}()
cache_inclusive(_) = False()
@static if Sys.isapple() && Sys.ARCH === :aarch64
@static if Sys.ARCH === :aarch64 && (Sys.isapple() || occursin("apple", Sys.CPU_NAME::String))
cache_linesize(_) = StaticInt{128}() # assume...
else
cache_linesize(_) = StaticInt{64}() # assume...
end
cache_size(_) = StaticInt{0}()

cache_type(::Union{Val{3},StaticInt{3}}) = Val{:Unified}()
cache_size(::Union{Val{3},StaticInt{3}}) = StaticInt{1441792}()
@static if Sys.ARCH === :aarch64 && (Sys.isapple() || occursin("apple", Sys.CPU_NAME::String))
else
cache_type(::Union{Val{3},StaticInt{3}}) = Val{:Unified}()
cache_size(::Union{Val{3},StaticInt{3}}) = StaticInt{1441792}()
end

_extra_init() = nothing

2 comments on commit 5b9b3c2

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/91391

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.4 -m "<description of version>" 5b9b3c2196b50fc9a2cbf7155347b2b4e80082eb
git push origin v0.2.4

Please sign in to comment.