Repository navigation
KleidiAI SVE2p1 halfgemm kernel integrated - #32670
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Native-packed batched execution can reject a later vector-length mismatch after earlier outputs have already been modified.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds KleidiAI SVE2.1 acceleration for MLAS FP16 HalfGemm while retaining SME/SME2 priority.
Changes:
- Adds Linux/Windows SVE2.1 detection and dispatch.
- Integrates SVE2.1 packing, execution, and vector-length handling.
- Updates KleidiAI and adds targeted tests.
File summaries
| File | Description |
|---|---|
cmake/deps.txt |
Updates KleidiAI to v1.30.0. |
onnxruntime/core/common/cpuid_info.cc |
Detects SVE2.1 capabilities. |
onnxruntime/core/common/cpuid_info.h |
Exposes SVE2.1 capability state. |
onnxruntime/core/mlas/lib/platform.cpp |
Enables HalfGemm overrides on SVE2.1. |
onnxruntime/core/mlas/lib/kleidiai/halfgemm_kleidiai.cpp |
Implements SVE2.1 packing and execution. |
onnxruntime/core/mlas/lib/kleidiai/mlasi_kleidiai.h |
Declares test hooks. |
onnxruntime/test/mlas/unittest/test_halfgemm.cpp |
Adds SVE2.1 kernel tests. |
onnxruntime/test/mlas/unittest/test_halfgemm.h |
Adds stride, packing, and canary helpers. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: melkap01 <melike.kaptan@arm.com>
Signed-off-by: melkap01 <melike.kaptan@arm.com>
1952e4b to
19c53eb
Compare
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Melike Kaptan (@melkap01-Arm) We're seeing some build errors from the packaging pipelines on arm64.
Build command:
I assume most of those arguments aren't relevant and simply building with VS 2022 might be enough to repro. Would you be able to take a look? |
Hi. This is a Windows on ARM issue. I was thinking this issue was not visible in your current public pipeline, so the builds there all passed.. |
|
Blocking our packaging pipelines so reasonably urgent but not blocking a current release. Can you work with an ORT developer to iterate on the solution? Edward Chen (@edgchen1) would you be able to help out with local testing by manually running the relevant part of the packaging pipeline against a branch with a potential fix? We're working on adding an arm64 CI that runs pre-checkin but need some capacity to be allocated to enable that: #32791 |
That is very helpful. Thanks |
Description
Integrates the Arm KleidiAI SVE2.1 FP16 HalfGemm kernel into MLAS.
Key changes:
writing any output.
the validated caller thread when worker VLs differ.
ldb.Kvalues exceeding the kernel’s supported range.Motivation and Context
SVE vector length is configured per thread, and the SVE2.1 packed RHS layout depends on that vector
length. A buffer packed by one thread cannot safely be consumed by a thread using a different VL.
This change enables KleidiAI HalfGemm acceleration on SVE2.1 systems without SME while preserving
SME/SME2 priority and preventing mismatched packed layouts from producing incorrect or partially
modified output.
Testing
Added coverage for:
Kconfigurations.A local Release KleidiAI build and CTest suite completed successfully. SVE2.1-specific tests are
hardware-gated and skip on systems without the required SVE2.1 capabilities.