x86 groupnorm instancenorm support bf16 storage with avx512bf16 dispatch#6594
x86 groupnorm instancenorm support bf16 storage with avx512bf16 dispatch#6594nihui merged 4 commits intoTencent:masterfrom
Conversation
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6594 +/- ##
========================================
Coverage 93.29% 93.29%
========================================
Files 852 856 +4
Lines 271477 271866 +389
========================================
+ Hits 253266 253636 +370
- Misses 18211 18230 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds bfloat16 (bf16) storage execution paths for the x86 InstanceNorm and GroupNorm layers, including AVX512BF16 runtime dispatch plumbing consistent with existing x86 bf16 patterns in the repo.
Changes:
- Enable
support_bf16_storageforInstanceNorm_x86andGroupNorm_x86and routeforward_inplace()to bf16 implementations whenopt.use_bf16_storageis enabled. - Add bf16 kernels for InstanceNorm/GroupNorm (
*_bf16s.h) using SSE/AVX/AVX512 code paths with scalar fallbacks. - Add AVX512BF16 runtime-dispatch entrypoints (
*_x86_avx512bf16.cpp) to allow calling a BF16-flag-compiled implementation when supported at runtime.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/layer/x86/instancenorm_x86_avx512bf16.cpp | Adds AVX512BF16 runtime-dispatch target symbol for InstanceNorm bf16 kernel. |
| src/layer/x86/instancenorm_x86.h | Declares InstanceNorm_x86() and bf16 forward helper. |
| src/layer/x86/instancenorm_x86.cpp | Enables bf16 storage support + implements bf16 inplace forward using new helper kernels. |
| src/layer/x86/instancenorm_bf16s.h | Adds bf16 mean/var + affine transform kernel with AVX512BF16 runtime dispatch hook. |
| src/layer/x86/groupnorm_x86_avx512bf16.cpp | Adds AVX512BF16 runtime-dispatch target symbol for GroupNorm bf16 kernel. |
| src/layer/x86/groupnorm_x86.h | Declares bf16 forward helper for GroupNorm. |
| src/layer/x86/groupnorm_x86.cpp | Enables bf16 storage support + implements bf16 inplace forward (including packing handling). |
| src/layer/x86/groupnorm_bf16s.h | Adds bf16 GroupNorm kernel with AVX512BF16 runtime dispatch hook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.