armv8.4 bf16 gemm optimization - #6714
Conversation
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9147e65201
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6714 +/- ##
==========================================
- Coverage 93.93% 93.86% -0.08%
==========================================
Files 933 932 -1
Lines 302704 307523 +4819
==========================================
+ Hits 284356 288660 +4304
- Misses 18348 18863 +515 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
This PR targets improved ARMv8.4 BF16 GEMM performance by adding BF16-aware packing paths and refactoring the BF16 GEMM flow to accumulate into FP32 tiles and apply alpha/beta during the final unpack step (instead of pre-scaling C).
Changes:
- Added runtime dispatch hooks to call BF16-instruction implementations when the runtime CPU supports BF16 but the baseline build lacks BF16/FP16 vector arithmetic.
- Added
__ARM_FEATURE_BF16_VECTOR_ARITHMETIC-gated fast paths in BF16 pack/transpose-pack routines. - Refactored BF16 GEMM tiling to always use a per-thread FP32 workspace tile and moved
betahandling intounpack_output_tile_fp32_to_bf16().
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/layer/arm/gemm_bf16s_fp16s.h |
Adds runtime BF16 dispatch and new BF16-vector-arithmetic packing/transpose-packing fast paths. |
src/layer/arm/gemm_arm.cpp |
Refactors BF16 GEMM tile loop to use FP32 tile + unified unpack applying alpha/beta. |
src/layer/arm/gemm_arm_bf16.cpp |
Adds BF16-target wrapper entry points for runtime-dispatched BF16 code paths. |
src/layer/arm/arm_usability.h |
Uses vcvt_bf16_f32 when BF16 vector arithmetic is available. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.