arm_cpu_features.cpp is a no-op
We don't attempt to detect any features of the host CPU on arm; surely we can do better, at least on Android.
I looked into this recently, and the state of host cpu feature sniffing on arm is woeful. There's an instruction for it, but it's privileged so user code can't run it. I checked xnnpack because I know it makes per-cpu decisions about what code to run, and it uses https://github.com/pytorch/cpuinfo which literally opens /proc/cpuinfo as a file and parses the string on linux-like targets.
The Golang runtime uses hwcap bits for Android and sysctlEnabled() for Darwin. (IIRC Arm recommends avoiding /proc/cpuinfo in favor of hwcap on linux.)
https://github.com/google/cpu_features is fairly well elaborated. I doubt we want to make it a dependency, but maybe providing the glue code to use it as an optional thing to add to one's build would be useful.
Does this apply to AArch64, too? I see there's a comment in aarch64_cpu_features.cpp that reads:
// AArch64 has no CPU-specific Features.
But isn't ARMDotProd an AArch64 extension? We probably want to check for SVE/SVE2, too.
Yes it does. The main problem here is that it fails to turn on armdotprod. I think that comment is from before we added dot product support.
See #7901