kleidiai: Add SME vs SME2 distinction in kernel dispatch (#25478)

The current integration treats SME as a single capability (CPU_FEATURE_SME)
with no distinction between SME(v1) and SME2. The kernels dispatched under
CPU_FEATURE_SME use SME2-specific instructions, making dispatch incorrect
on SME(v1)-only hardware.

We introduce build-time and runtime distinction between SME and SME2, and
wire SME(v1) and SME2 kernels based on actual hardware support.
This commit is contained in:
Rajendra Matcha
2026-07-16 08:57:04 -07:00
committed by GitHub
parent b15ca938ad
commit f15bd60901
8 changed files with 178 additions and 13 deletions
+8
View File
@@ -3792,6 +3792,14 @@ int ggml_cpu_has_sme(void) {
#endif
}
int ggml_cpu_has_sme2(void) {
#if defined(__ARM_ARCH) && defined(__ARM_FEATURE_SME2)
return 1;
#else
return 0;
#endif
}
void ggml_cpu_init(void) {
// needed to initialize ggml_time
{