-
Notifications
You must be signed in to change notification settings - Fork 50
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
add support in archdetect for detecting A64FX #608
Merged
bedroge
merged 7 commits into
EESSI:2023.06-software.eessi.io
from
boegel:2023.06-software.eessi.io_archdetect-a64fx
Jan 10, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cb1672b
add support for detecting A64FX to archdetect
boegel f376b9a
Merge branch '2023.06-software.eessi.io' into 2023.06-software.eessi.…
boegel 5bad2d9
use 0x46 as 'CPU implementer' field for A64FX
boegel e53ac16
fall back to 'CPU implementer' field from /proc/cpuinfo if 'Vendor ID…
boegel f112406
add Deucalion-Rocky85.all.output for archdetect tests
boegel d82a188
set correct 'CPU implementer' for graviton2/graviton3
boegel 562fd4d
fix logic for determining field to use to determine CPU flags
boegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# ARM CPU architecture specifications (see https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html for guidance) | ||
# Software path in EESSI | Vendor ID | List of defining CPU features | ||
# CPU implementers: 0x41 (ARM), 0x46 (Fujitsu) - also see https://github.com/hrw/arm-socs-table/blob/main/data/socs.yml | ||
|
||
# Software path in EESSI | 'Vendor ID' or 'CPU implementer' | List of defining CPU features | ||
"aarch64/a64fx" "0x46" "asimdhp sve" # Fujitsu A64FX | ||
"aarch64/neoverse_n1" "ARM" "asimddp" # Ampere Altra | ||
"aarch64/neoverse_n1" "" "asimddp" # AWS Graviton2 | ||
"aarch64/neoverse_n1" "0x41" "asimddp" # AWS Graviton2 | ||
"aarch64/neoverse_v1" "ARM" "asimddp svei8mm" | ||
"aarch64/neoverse_v1" "" "asimddp svei8mm" # AWS Graviton3 | ||
"aarch64/neoverse_v1" "0x41" "asimddp svei8mm" # AWS Graviton3 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
aarch64/a64fx:aarch64/generic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
processor : 0 | ||
BogoMIPS : 200.00 | ||
Features : fp asimd evtstrm sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm fcma dcpop sve | ||
CPU implementer : 0x46 | ||
CPU architecture: 8 | ||
CPU variant : 0x1 | ||
CPU part : 0x001 | ||
CPU revision : 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
aarch64/a64fx |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when there are multiple vendors implementing the instruction set, like with Gravition/Grace for "aarch64/neoverse_v2"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is only necessary when there is a doubt about what the match is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html only lists Graviton 3 as CPU supporting Neoverse V1, so that makes it very unlikely in practice we'll run into something that's detected as Neoverse V1 but isn't a Graviton 3 (at least today).
For
neoverse_v2
with Graviton 4 vs Grace, there's a more complex situation though, because Graviton 4 supports CPU instructions likepaca
,pacg
,rng
which Grace doesn't, and the other way around (likesm3
,sm4
,svesm4
).It gets even more interesting when Google Axion is taken into account, since that doesn't support
sbss
, which the other two do...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, it is right there in the file, just means we need to add each supported CPU explicitly. That seems like a bit of a pity, doesn't it make the archdetect selection very conservative if it encounters a CPU it hasn't seen before? It doesn't matter if the CPU has all the required features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that quite a big problem? Can we disable some instructions? I guess compilers would be caught by surprise...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This data is probably pretty useful for us: https://github.com/hrw/arm-socs-table/tree/main/cpuinfo-data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we shouldn't have a much more considered set of CPU features that reflect the CPU where the software was built for the target and then match that? This would do a much better job of future matching CPUs. Is it really the case that CPU features alone are not enough to distinguish A64FX from Neoverse_N1?
Not going to hold this PR back for that discussion, will open an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also wondering if we can instruct the compiler to not emit particular instructions even if they're supported.
My gut says that should be possible, but I'm not sure it actually is...
Let's follow up on that in a dedicated issue though => #845
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For A64FX vs Neoverse N1/V1, see the
/proc/cpuinfo
dumps we have undertests/archdetect/
.