`cachesize()` and `cachelinesize()` do not work on ARM architectures
Opened this issue · 1 comments
amrueda commented
I need to read the cache line size in my application. However, for some reason, CpuId
returns the following on an Apple M2 Pro chip:
julia> using CpuId
julia> cachesize()
ERROR: This CPU does not provide information on cpuid leaf 0x00000004.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] _throw_unsupported_leaf(leaf::UInt32)
@ CpuId ~/.julia/packages/CpuId/n7zKC/src/CpuId.jl:38
[3] cachesize()
@ CpuId ~/.julia/packages/CpuId/n7zKC/src/CpuId.jl:737
[4] top-level scope
@ REPL[8]:1
julia> cachelinesize()
0
giordano commented
for some reason
I think you missed this at the very beginning of the README of this package
Works on Julia 1.0 and later, on Linux, Mac and Windows with Intel CPUs and AMD CPUs. Other processor types like ARM are not supported.
CPUID is a set of instructions for x86 CPUs.