-
Notifications
You must be signed in to change notification settings - Fork 35
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
Renaming AWS graviton2 target as neoverse-n1
#41
Comments
cc @alalazo for visibility |
In this repo, the If we were to use the name of Arm Core IP architectures, names should looks like
Special case is A64FX since it is a custom uarch from Fujitsu. But I do not see a target files for that. |
I have been revisiting this issue, to cut a release at the end of the week and port it to Spack. I think our current labeling is ok since:
We might want to add a "label alias" later, to say that For reference, here's what I obtain with GCC 9.4.0 using our current optimization line for $ gcc -dM -E - -mcpu=neoverse-n1 < /dev/null | grep __ARM_FEATURE_
#define __ARM_FEATURE_ATOMICS 1
#define __ARM_FEATURE_UNALIGNED 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_QRDMX 1
#define __ARM_FEATURE_DOTPROD 1
#define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
#define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_CRC32 1
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
$ gcc -dM -E - -march=armv8.2-a+fp16+rcpc+dotprod+crypto -mtune=neoverse-n1 < /dev/null | grep __ARM_FEATURE_
#define __ARM_FEATURE_ATOMICS 1
#define __ARM_FEATURE_UNALIGNED 1
#define __ARM_FEATURE_AES 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_QRDMX 1
#define __ARM_FEATURE_DOTPROD 1
#define __ARM_FEATURE_CRYPTO 1
#define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
#define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_SHA2 1
#define __ARM_FEATURE_CRC32 1
#define __ARM_FEATURE_NUMERIC_MAXMIN 1 |
Question: since |
Crypto isn't really a separate feature, it's an alias for aes + sha2 |
Similar problem on the Azure Arm instances powered by Ampere Altra which went GA on 1 Sept 2022:
An interesting difference here is that here I think @fspiga's argument for microarchitectures vs product names is compelling. There are also advantages between discriminating AWS Graviton and Ampere Altra though: although a binary compiled on one may run fine on the other, compiler optimizations being used may be different (depending on the exact compiler flags being used), which could impact performance. |
Can somebody post a cat of |
AWS Graviton2, Amazon Linux:
Ampere Altra (Azure), Ubuntu:
|
@boegel Can you post |
I took the Ampere Altra bit from https://github.com/EESSI/software-layer/pull/187/files#diff-d35bee727b3c563d7a3faf81cbe1ce6fda4d1167ef18e3b6d0f4d9c622e9e413, so maybe @hmeiland can clarify whether this is indeed |
|
Adding on the list above. It is now public that AWS Graviton3 is Arm Neoverse V1 (armv8). Same core IP will be SiPearl Rhea. NVIDIA Grace is Arm Neoverse V2 (armv9). |
Are there additional instructions going from |
@alalazo: my recommendation here, unless we can find a way to meaningfully differentiate between For backward compatibility in Spack we have two options, I think:
I think the only current (major?) consumer of the I also don't see why we can't move upstream on while we work these things out in Spack -- I think it would be good to do. |
Renaming is doable. The issue here is if we should go with
which adds also |
@OliverPerks @stephenmsachs any advice on the flag recommendation here? |
Further data point, I am in a root@374eedf176f2:/# clang --version
Ubuntu clang version 14.0.0-1ubuntu1
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@374eedf176f2:/# clang -dM -E - -mcpu=neoverse-n1 < /dev/null | grep __ARM_FEATURE_ | sort
#define __ARM_FEATURE_AES 1
#define __ARM_FEATURE_ATOMICS 1
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_CRC32 1
#define __ARM_FEATURE_CRYPTO 1
#define __ARM_FEATURE_DIRECTED_ROUNDING 1
#define __ARM_FEATURE_DIV 1
#define __ARM_FEATURE_DOTPROD 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
#define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_LDREX 0xF
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_QRDMX 1
#define __ARM_FEATURE_SHA2 1
#define __ARM_FEATURE_UNALIGNED 1 and root@374eedf176f2:/# gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@374eedf176f2:/# gcc -dM -E - -mcpu=neoverse-n1 < /dev/null | grep __ARM_FEATURE_ | sort
#define __ARM_FEATURE_ATOMICS 1
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_CRC32 1
#define __ARM_FEATURE_DOTPROD 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC 1
#define __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_QRDMX 1
#define __ARM_FEATURE_UNALIGNED 1 |
Hi all. @fspiga pointed me to this thread. I manage the compiler & library technical roadmaps here at Arm. There's a long backstory here - crypto features such as AES and SHA2 aren't universally available, largely due to export constraints. This has led to an unfortunate wrinkle that you've just fallen upon, where they're enabled by default in clang, and not in gcc. gcc's behaviour is more correct, but it's non-trivial to change this in clang for v8 cores, as it creates a backwards compatibility headache. For all future v9 cores (eg Neoverse N2, V2, Cortex-X2), clang should not enable this by default The easiest way of ensuring that clang and gcc do the same thing here is with one of the following:
hth, Will Lovett
|
Summary
I am working on NVIDIA Arm HPC Developer Kit (https://developer.nvidia.com/arm-hpc-devkit) which is equipped with Ampere Computing 'Altra' CPU.
When running spack (any recent released tags and giot head), the CPU is recornised as
graviton2
despite it is not. This is what I get on an internal deployment:Spack version:
0.17.1-1338-fddc58387c
Rationale
graviton2
is not the only Arm-based CPU supporting Arm Neoverse N1 core IP. See https://www.anandtech.com/show/15578/cloud-clash-amazon-graviton2-arm-against-intel-and-amd and https://www.anandtech.com/show/15575/amperes-altra-80-core-n1-soc-for-hyperscalers-against-rome-and-xeonSince two Arm-based CPUs are based on the same Arm Core IP, it is very hard to distinguish them based on what linux reports. Spack does nothing wrong here, it looks at "Features" listed in
/proc/cpuinfo
. However the list of supported CPU uarch features support by AWS Graviton2 and Ampere Compouting Altra are the sameGraviton2:
Ampere Computing Altra:
Description
Rename target
graviton2
toneoverse-n1
.Additional information
In practice, nothing breaks at the moment. However it can be confusing for a non-experienced user to see spack recornising "graviton2" as target when running on system with Ampere Computing Altra CPU.
General information
spack --version
and reported the version of SpackThe text was updated successfully, but these errors were encountered: