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

Improve ARM features detection #132

Open
Dr-Noob opened this issue Dec 7, 2021 · 5 comments
Open

Improve ARM features detection #132

Dr-Noob opened this issue Dec 7, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@Dr-Noob
Copy link
Owner

Dr-Noob commented Dec 7, 2021

Current features detected under ARM are not always relevant, and probably there are relevant features that are not shown (e.g, #130).

A list of relevant features should be elaborated and the program should be updated accordingly.

@Dr-Noob
Copy link
Owner Author

Dr-Noob commented Sep 14, 2022

Another related issue is in get_features_info where it is assumed that all cores share the same capabilities, which probably is not.

@Dr-Noob
Copy link
Owner Author

Dr-Noob commented Sep 14, 2022

This shows that not all ARM cores have 1 SIMD unit. It is also worth noting that NEON includes FMA, which is not considered in the current cpufetch code

@Dr-Noob
Copy link
Owner Author

Dr-Noob commented Sep 14, 2022

This suggests a better implementation for (at least) fetching the MIDR.

@Wunkolo
Copy link
Contributor

Wunkolo commented Feb 6, 2024

Oaknut, the ARM64 emitter, also has some expansive detection of processor features across different operating systems and platforms that could be a good reference:

https://github.com/merryhime/oaknut/tree/6b1d57ea7ed4882d32a91eeaa6557b0ecb4da152/include/oaknut/feature_detection

@Dr-Noob
Copy link
Owner Author

Dr-Noob commented Feb 6, 2024

Oaknut, the ARM64 emitter, also has some expansive detection of processor features across different operating systems and platforms that could be a good reference:

https://github.com/merryhime/oaknut/tree/6b1d57ea7ed4882d32a91eeaa6557b0ecb4da152/include/oaknut/feature_detection

They use getauxval as far as I can tell (which it's the same I use). I don't think there is much more ways to do it.

I've had in mind for a long time to remove all features but NEON, and also check how to find if the CPU supports SVE and/or SME, which would be the "equivalent" to the features shown in the x86 version. Maybe also renaming it to "Vector extensions", e.g., go from:

Features: NEON, SHA1, SHA2, AES, CRC32

to

Vector extensions: NEON, SVE, SME

Another thing I have in mind is to show the ARM version (This is already implemented but not simply not shown). I don't know which title to use or if it should be merged into another line.

I think I'll implement all these ideas for the upcoming cpufetch release.

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

No branches or pull requests

2 participants