Giter Site home page Giter Site logo

Comments (12)

klauspost avatar klauspost commented on July 22, 2024

@gounselor Thanks! I assume there is nothing wrong with the listed features?

from cpuid.

gounselor avatar gounselor commented on July 22, 2024

@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.

klauspost avatar klauspost commented on July 22, 2024

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.

gounselor avatar gounselor commented on July 22, 2024

Ok, so this is actual expected?

from cpuid.

klauspost avatar klauspost commented on July 22, 2024

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.

gounselor avatar gounselor commented on July 22, 2024

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.

klauspost avatar klauspost commented on July 22, 2024

@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.

gounselor avatar gounselor commented on July 22, 2024

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.

gounselor avatar gounselor commented on July 22, 2024

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.

klauspost avatar klauspost commented on July 22, 2024

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.

gounselor avatar gounselor commented on July 22, 2024

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.

klauspost avatar klauspost commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.