Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processor model is not detected on Azure arm64 #2577

Closed
EgorBo opened this issue May 27, 2024 · 6 comments
Closed

Processor model is not detected on Azure arm64 #2577

EgorBo opened this issue May 27, 2024 · 6 comments
Assignees
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented May 27, 2024

When I run any benchmark on Azure ARM64, it reports

BenchmarkDotNet v0.13.12, Ubuntu 22.04.4 LTS (Jammy Jellyfish)
Unknown processor

E.g. dotnet/runtime#102705 (comment)

cat /proc/cpuinfo (which BDN uses) outputs:

$ cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x3
CPU part        : 0xd0c
CPU revision    : 1

processor       : 1
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x3
CPU part        : 0xd0c
CPU revision    : 1
...

and lscpu is:

$ lscpu
Architecture:           aarch64
  CPU op-mode(s):       32-bit, 64-bit
  Byte Order:           Little Endian
CPU(s):                 16
  On-line CPU(s) list:  0-15
Vendor ID:              ARM
  Model name:           Neoverse-N1
    Model:              1
    Thread(s) per core: 1
    Core(s) per socket: 16
    Socket(s):          1
    Stepping:           r3p1
    BogoMIPS:           50.00
    Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp

So at least Neoverse-N1, 16 cores would be better than Unknown processor.

From my understanding, on Azure we have

  1. Neoverse-N1 (Ampere Altra)
  2. Neoverse-N2 (Cobalt 100) (e.g. this is how it's recognized in LLVM)

I'll try to implement it myself if nobody grabs it 🙂

@adamsitnik
Copy link
Member

I'll try to implement it myself if nobody grabs it

I am afraid that others might not be able to test this particular case easily. Should I just assign you? ;)

@EgorBo
Copy link
Member Author

EgorBo commented May 27, 2024

I'll try to implement it myself if nobody grabs it

I am afraid that others might not be able to test this particular case easily. Should I just assign you? ;)

Sure, please do 🙂

@AndreyAkinshin
Copy link
Member

@EgorBo should be fixed now. Could you please try 0.14.1-nightly.20240826.175 and check if it correctly detects Neoverse-N1?

@EgorBo
Copy link
Member Author

EgorBo commented Aug 26, 2024

@EgorBo should be fixed now. Could you please try 0.14.1-nightly.20240826.175 and check if it correctly detects Neoverse-N1?

Just checked:

// * Summary *

BenchmarkDotNet v0.14.1-nightly.20240826.175, Ubuntu 24.04 LTS (Noble Numbat)
Neoverse-N1, 16 physical cores
.NET SDK 9.0.100-preview.7.24407.12
  [Host]     : .NET 9.0.0 (9.0.24.40507), Arm64 RyuJIT AdvSIMD
  Job-FPTMIV : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD

Thanks!! Will check on N2 later as well

@AndreyAkinshin
Copy link
Member

Today I learned that the lscpu output repsects the system language12. Thus, the current parsing logic will fail to detect Model name on systems with non-English locale. One more fix with language-invariant lscpu call is coming.

Footnotes

  1. Linux: Set language to default for console or scripts (2015-09-17) by Nerd Admin

  2. nicolargo/glances#2616: "Raspberry PI - CPU info is not correct"

@AndreyAkinshin
Copy link
Member

@EgorBo, 0.14.1-nightly.20240826.177 contains the language-invariant fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants