-
Notifications
You must be signed in to change notification settings - Fork 4.4k
reduction vulkan shader #6476
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?
reduction vulkan shader #6476
Conversation
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 Vulkan compute shader support for the Reduction layer in the ncnn neural network framework. The implementation provides GPU-accelerated tensor reduction operations across various dimensions.
Key changes:
- Adds a new Vulkan compute shader (
reduction.comp) that performs reduction operations (sum, mean, max, min, product, etc.) using shared memory and parallel reduction - Implements the
Reduction_vulkanclass as a Vulkan backend for the Reduction layer - Supports multiple reduction operations, multi-dimensional tensors (1D-4D), and configurable axis reduction with keepdims option
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/layer/vulkan/shader/reduction.comp | Vulkan compute shader implementing parallel reduction with support for 11 operation types and 1D-4D tensors |
| src/layer/vulkan/reduction_vulkan.h | Header file declaring the Reduction_vulkan class interface |
| src/layer/vulkan/reduction_vulkan.cpp | Implementation of Reduction_vulkan including pipeline creation and forward pass execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6476 +/- ##
===========================================
- Coverage 93.28% 93.26% -0.03%
===========================================
Files 842 694 -148
Lines 265270 163497 -101773
===========================================
- Hits 247450 152481 -94969
+ Misses 17820 11016 -6804 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
|
Please enable github action in YOUR FORKED REPO to make code-format workflow work |
…_vulkan # Conflicts: # src/layer/vulkan/shader/reduction.comp
No description provided.