-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add shuffle channel rvv optimization #6243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #6243 +/- ##
===========================================
- Coverage 95.92% 90.71% -5.21%
===========================================
Files 836 292 -544
Lines 264899 89584 -175315
===========================================
- Hits 254098 81265 -172833
+ Misses 10801 8319 -2482 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The binary size change of libncnn.so (bytes)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds RISC-V vector (RVV) optimization for the ShuffleChannel layer operation. It introduces optimized implementations for both fp32 and fp16/bf16 data types, leveraging RISC-V vector extensions to improve performance compared to scalar implementations.
- Adds RVV-optimized shuffle channel operations with support for different element packing sizes
- Implements specialized code paths for common group sizes (2, 4, 8) using vector gather operations
- Provides fallback to unpacked processing for complex group configurations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
File | Description |
---|---|
src/layer/riscv/shufflechannel_riscv.h | Header file defining the RISC-V-specific ShuffleChannel class with forward declaration methods |
src/layer/riscv/shufflechannel_riscv.cpp | Main implementation with RVV optimizations for fp32 and fp16/bf16 shuffle operations |
主要改动:
参考 #4907 添加了 shuffle channel rvv 优化
几乎没有对原 pr 的代码逻辑进行改动
close #6206