archspec / archspec-json

Other
20 stars 32 forks source link

Neoverse N2 is not detected #97

Closed dslarm closed 1 month ago

dslarm commented 4 months ago

Currently Neoverse-N2 is not identified, it is shown as a 'aarch64' and not neoverse-n2:

In terms of flags seen from lscpu with Ubuntu 22.04.2: Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti

and the /proc/cpuinfo that says this is an n2 (as used by LLVM's detection of arch=native):

CPU part : 0xd49

alalazo commented 4 months ago

Would you mind submitting a pull request adding neoverse-n2 + at least a test with a sample of proc/cpuinfo ?

dslarm commented 4 months ago

Would you mind submitting a pull request adding neoverse-n2 + at least a test with a sample of proc/cpuinfo ?

Is there support for the CPU ID field? I couldn't see mention of that in the docs: the issue here is that the neoverse_n2 and neoverse_v2 have exactly the same features - so matching by closest feature list would not be right.

The pertinent difference between the cores here would be that n2 has 2x128b SVE / Neon and v2 has 4x128b SVE / Neon - which would mean a binary generated for one would work on the other, but you'd be missing out on compiler tuning (ie. cost model).

dslarm commented 1 month ago

@alalazo - I should have access again soon, but not immediately. I'll add it when I do.