Skip to content

Conversation

@futz12
Copy link
Contributor

@futz12 futz12 commented Jan 2, 2026

No description provided.

@github-actions github-actions bot added the vulkan label Jan 2, 2026
@futz12 futz12 mentioned this pull request Jan 2, 2026
Copy link
Contributor

Copilot AI left a 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_vulkan class 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-commenter
Copy link

codecov-commenter commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (e5639d3) to head (1c3c3e1).
⚠️ Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ futz12
❌ nihui
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Please enable github action in YOUR FORKED REPO to make code-format workflow work

@nihui nihui closed this Jan 5, 2026
@nihui nihui reopened this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants