Comments (12)
@gounselor Thanks! I assume there is nothing wrong with the listed features?
from cpuid.
@klauspost let me attach /proc/cpuinfo:
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
Hardware : BCM2835
Revision : c03111
Serial : 1000000033c9f617
Model : Raspberry Pi 4 Model B Rev 1.1
I'm happy to help, debug or try things out.
from cpuid.
Looks like it matches. So this is pretty much what I expect for now.
Maybe I can mimmic how Go sets the number of processors for GOMAXPROCS.
from cpuid.
Ok, so this is actual expected?
from cpuid.
Yes, hence why the documentation says:
Note that currently only features are detected on ARM, no additional information is currently available.
Referring to Features: ARMCPUID,ASIMD,CRC32,EVTSTRM,FP
If you want to, this should add some values for core counts, though it relies on the OS to provide that sparse information: #67
from cpuid.
Ok i understand. Just read about MIDR_EL1 here https://www.kernel.org/doc/html/latest/arm64/cpu-feature-registers.html.
So there is no easy way to get the values (besides reading /sys/devices/system/cpu/cpu0/regs/identification/midr_el1 on linux) and the feature flags are what counts here.
I guess this issue then might be closed. Thanks Klaus, (also for compress!)
from cpuid.
@gounselor I added some more info to #67 - though it is not super useful information and since I don't have any hardware to test it is rather cumbersome and travis takes hours to complete a single test.
from cpuid.
I tried to build with a cloned repo, branch origin/arm64-linux-detect-cores with go.mod replace and i get this:
github.com/klauspost/cpuid/v2.getproccount: relocation target runtime·sched_getaffinity not defined
Maybe i did something wrong using the clone repo, go.mod replace approach.
from cpuid.
Update:
replaced runtime·sched_getaffinity with runtime.sched_getaffinity in the cloned repo, it compiles. Output:
ms@pi64:~/Sync/cpuid$ ./cpuid
Name:
PhysicalCores: 4
ThreadsPerCore: 1
LogicalCores: 4
Family 0 Model: 0 Vendor ID: VendorUnknown
Features: ARMCPUID,ASIMD,CRC32,EVTSTRM,FP
Cacheline bytes: 64
L1 Data Cache: -1 bytes
L1 Instruction Cache: -1 bytes
L2 Cache: -1 bytes
L3 Cache: -1 bytes
Frequency 0 hz
Nice.
from cpuid.
Ah, I found it as well.
Ah, it shouldn't return right after the detectOS(c)
. I've updated the PR. does that make a difference?
from cpuid.
Yes:
Name:
PhysicalCores: 4
ThreadsPerCore: 1
LogicalCores: 4
Family 15 Model: 53379 Vendor ID: ARM
Features: ARMCPUID,ASIMD,CRC32,EVTSTRM,FP,GPA
Cacheline bytes: 64
L1 Data Cache: -1 bytes
L1 Instruction Cache: -1 bytes
L2 Cache: -1 bytes
L3 Cache: -1 bytes
Frequency 0 hz
Family is now detected.
from cpuid.
Merged. CI shows:
0.99s$ go test -test.v -test.run ^TestCPUID$
=== RUN TestCPUID
--- PASS: TestCPUID (0.00s)
cpuid_test.go:28: Max Function:0x0
cpuid_test.go:30: Max Extended Function:0x0
cpuid_test.go:31: VendorString: Applied Micro Circuits Corporation
cpuid_test.go:32: VendorID: AMCC
cpuid_test.go:33: Name:
cpuid_test.go:34: PhysicalCores: 32
cpuid_test.go:35: ThreadsPerCore: 1
cpuid_test.go:36: LogicalCores: 32
cpuid_test.go:37: Family 63 Model: 2
cpuid_test.go:38: Features: AESARM,ARMCPUID,ASIMD,CRC32,EVTSTRM,FP,GPA,PMULL,SHA1,SHA2
cpuid_test.go:39: Cacheline bytes: 64
cpuid_test.go:40: L1 Instruction Cache: -1 bytes
cpuid_test.go:41: L1 Data Cache: -1 bytes
cpuid_test.go:42: L2 Cache: -1 bytes
cpuid_test.go:43: L3 Cache: -1 bytes
cpuid_test.go:44: Hz: 0 Hz
PASS
from cpuid.
Related Issues (20)
- Process hangs for an hour on init HOT 9
- CPUID and NFD support: AVX_VNNI HOT 9
- Difference in characteristics between lscpu and cpuid go implementation for AMD Ryzen HOT 1
- Provide stepping information for Intel CPU HOT 1
- Possible SCE check issue HOT 13
- Looks at CPUID leaves it should not HOT 5
- L1 icache and dcache on M1 are the same sysctl HOT 1
- Can this package support detecting CPU microarchitecture information? HOT 3
- Discussion: Support detecting confidential guests (TDX, SNP, SEV) running on Azure nodes HOT 3
- Processor cores not displayed correctly HOT 1
- Number of cores not detected under VMware ESXi HOT 3
- I have one my Windows 10 Pro Physical Desktop Machine, still it's returning true for the call cpuid.CPU.VM() HOT 5
- Spurious debug line: "frequencies(): ..." HOT 1
- CPU.Hz returns 0? HOT 1
- CPU without L3 cache shows -1 bytes of L3 HOT 1
- main.go:7:2: cannot find package "github.com/klauspost/cpuid/v2" in any of: HOT 2
- main.go:7:2: cannot find package "github.com/klauspost/cpuid/v2" in any of: HOT 3
- Can this package support arm linux HOT 1
- Can not compile to amd64 in mac m1 arm HOT 1
- Support for memory encryption cpuids (AMD SME, SEV and Intel TME) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpuid.