-
Notifications
You must be signed in to change notification settings - Fork 350
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
runtime neon detection #383
base: master
Are you sure you want to change the base?
Conversation
tested on Oracle Cloud's cheapest ARM VPS VM.Standard.A1.Flex
If you go to the generic AArch64 manual instead of the Cortex-A75 one, a value of 0 means that AdvSIMD is present, a value of 1 means AdvSIMD+FP16 is present, and a value of 15 means no AdvSIMD. I was under the impression that AdvSIMD was a required feature of AArch64. Go figure. |
Edit: Yes, it should be != 15, thanks! added. @sneves hmm... does that mean
is better? |
As far as I know standard ARMv8 implementations are required to support NEON, so apart from some rare special purpose CPUs NEON is guaranteed to be available. I heavily doubt that such a special purpose CPU would be used to run off-the-mill binaries / these people would compile with NEON=off anyways. Therefore it looks a whole lot like checking for SSE2 on x86-64 to me. |
Note that the code in this PR will need minor changes now that #389 has been merged. Details here: #389 (comment) |
tested on Oracle Cloud's cheapest ARM VPS VM.Standard.A1.Flex, seems to work.
related documentation: https://developer.arm.com/documentation/100403/0200/register-descriptions/aarch64-system-registers/id-aa64pfr0-el1--aarch64-processor-feature-register-0--el1
seems the ARM marketing department calls it "NEON" and the ARM engineering department calls it "AdvSIMD".
possible alternative for #382