Skip to content

softplus vulkan shader#6478

Merged
nihui merged 10 commits intoTencent:masterfrom
futz12:erf-vulkan
Feb 25, 2026
Merged

softplus vulkan shader#6478
nihui merged 10 commits intoTencent:masterfrom
futz12:erf-vulkan

Conversation

@futz12
Copy link
Copy Markdown
Contributor

@futz12 futz12 commented Jan 2, 2026

No description provided.

@github-actions github-actions bot added the vulkan label Jan 2, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.29%. Comparing base (9bd6551) to head (91bc706).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6478      +/-   ##
==========================================
+ Coverage   93.23%   93.29%   +0.05%     
==========================================
  Files         852      855       +3     
  Lines      267286   266929     -357     
==========================================
- Hits       249195   249021     -174     
+ Misses      18091    17908     -183     

☔ 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
Copy Markdown
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.

Copy link
Copy Markdown
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 GPU shader support for the Softplus activation layer. The Softplus function computes log(exp(x) + 1), which is a smooth approximation of the ReLU activation function. The implementation follows the established pattern for simple activation layers in NCNN, with a header file defining the Vulkan-specific layer class, a C++ implementation file handling pipeline creation/destruction and dispatching, and a GLSL compute shader implementing the actual Softplus computation.

Changes:

  • Added Vulkan layer implementation for Softplus activation (header and source)
  • Added GLSL compute shader implementing the Softplus formula log(exp(v) + 1)
  • Follows the established pattern for simple inplace activation layers

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/layer/vulkan/softplus_vulkan.h Header file defining the Softplus_vulkan class with pipeline management and forward_inplace methods
src/layer/vulkan/softplus_vulkan.cpp Implementation of pipeline creation, destruction, and compute dispatch logic
src/layer/vulkan/shader/softplus.comp GLSL compute shader implementing the Softplus activation function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nihui nihui merged commit a64aa7f into Tencent:master Feb 25, 2026
63 of 66 checks passed
@nihui
Copy link
Copy Markdown
Member

nihui commented Feb 25, 2026

Thanks for your contribution !

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.

5 participants