Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6607 +/- ##
==========================================
- Coverage 93.41% 92.64% -0.78%
==========================================
Files 868 873 +5
Lines 275540 273876 -1664
==========================================
- Hits 257391 253726 -3665
- Misses 18149 20150 +2001 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds MIPS (MSA-accelerated) implementations for several activation/unary layers to improve performance on MIPS targets, including vectorized erf support needed by GELU.
Changes:
- Introduces new MIPS layer implementations: ELU, SELU, GELU, and Erf (with MSA vector paths + scalar fallback).
- Extends MSA math utilities with a vectorized
erf_ps()approximation used by GELU/Erf. - Adds an MSA helper
elu_ps()to the shared MIPS activation utilities.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/layer/mips/selu_mips.h | Declares SELU_mips layer class for MIPS backend. |
| src/layer/mips/selu_mips.cpp | Implements SELU forward with optional MSA vectorization and packing support. |
| src/layer/mips/gelu_mips.h | Declares GELU_mips layer class for MIPS backend. |
| src/layer/mips/gelu_mips.cpp | Implements GELU forward (fast + exact modes) with optional MSA vectorization. |
| src/layer/mips/erf_mips.h | Declares Erf_mips layer class for MIPS backend. |
| src/layer/mips/erf_mips.cpp | Implements Erf forward with optional MSA vectorization using erf_ps. |
| src/layer/mips/elu_mips.h | Declares ELU_mips layer class for MIPS backend. |
| src/layer/mips/elu_mips.cpp | Implements ELU forward with optional MSA vectorization using elu_ps. |
| src/layer/mips/msa_mathfun.h | Adds MSA vector erf_ps() and supporting constants. |
| src/layer/mips/mips_activation.h | Adds MSA helper elu_ps() for reuse in ELU and potentially other codepaths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Thanks for your contribution ! |
chenglimin
pushed a commit
to chenglimin/ncnn
that referenced
this pull request
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.