Skip to content

Conversation

@JonathanC-ARM
Copy link
Contributor

Description

In Various parts of Onnxruntime and in particular MLAS with kleidiai enabled. We rely on cpu info checks for SME and/or SME2 this patch aims to simplify that process by adding a struct which gives easy to understand information and adding it to the relevant places in the code.

Additionally it gates qgemm_kleidiai.cpp properly against non sme2 hardware gaining access. This will address #26377 which raises one such instance of this occurring on a device with has SME1 support but not SME2

Signed-off-by: Jonathan Clohessy <jonathan.clohessy@arm.com>
@devang-ml devang-ml requested a review from edgchen1 November 26, 2025 20:04

// Boolean condition to determine if we can use SME2
// By default we should try for SME2 first before falling back to SME.
inline const bool SMEInfo::CanUseSME2 = MLAS_CPUIDINFO::GetCPUIDInfo().HasArm_SME2();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPUIDInfo::HasArm_SME2() already returns a cached bool. is it worth having another constant for the same value? admittedly, SMEInfo::CanUseSME2 is less to type, but it may be simpler to just have a single way of getting this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants