arm unified elempack optimization for groupnorm#4080
Conversation
mmyyy22
commented
Jul 23, 2022
- add groupnorm_arm optimize
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4080 +/- ##
========================================
Coverage 95.70% 95.70%
========================================
Files 827 829 +2
Lines 269904 270328 +424
========================================
+ Hits 258301 258722 +421
- Misses 11603 11606 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
hi, the test failure indicates that your code produces wrong result in some condition. please investigate it. |
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an optimized group normalization implementation for ARM with unified elempack support, enhancing performance in FP16 calculations.
- Updated test logging to include additional dimensions and the affine flag.
- Added a new implementation (groupnorm_arm_asimdhp.cpp) using ARM NEON intrinsics for FP16 arithmetic.
- Introduced header declarations in groupnorm_arm.h for the new methods.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_groupnorm.cpp | Updated test log formatting to print additional tensor dimensions and the affine flag. |
| src/layer/arm/groupnorm_arm_asimdhp.cpp | New optimized FP16 group normalization implementation using ARM NEON intrinsics. |
| src/layer/arm/groupnorm_arm.h | Header declarations for the ARM-optimized groupnorm functions. |
Comments suppressed due to low confidence (1)
src/layer/arm/groupnorm_arm_asimdhp.cpp:25
- Consider adding a function-level comment for groupnorm_fp16s to explain its purpose, algorithm, and parameter assumptions. This will improve code readability and maintainability.
static void groupnorm_fp16s(__fp16* ptr, const float* gamma_ptr, const float* beta_ptr, float eps, int channels, int size, int elempack, size_t cstep)
|
Thanks for your contribution ! |
|
The binary size change of libncnn.so (bytes)
|