[AArch64] Enable SME feature detection on Apple Silicon

Check for availability of SME and SME2 by looking for the
hw.optional.arm.FEAT_SME2 feature string in sysctlbyname. Non-streaming
SVE is not supported but for our purposes the features can be treated as
orthogonal since our SME code will only ever run in streaming mode.

Change-Id: I7e9d242e0f581217b625d74c7c3b0c76a0fe03da
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5683128
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
George Steed 2024-06-11 16:12:52 +01:00 committed by Frank Barchard
parent 11ff6067a5
commit fcbe22c59c

View File

@ -256,6 +256,9 @@ LIBYUV_API SAFEBUFFERS int AArch64CpuCaps() {
features |= kCpuHasNeonDotProd;
if (have_feature("hw.optional.arm.FEAT_I8MM")) {
features |= kCpuHasNeonI8MM;
if (have_feature("hw.optional.arm.FEAT_SME2")) {
features |= kCpuHasSME;
}
}
}
// No SVE feature detection available here at time of writing.