Repository navigation
Softplus kernel - #6
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The release version mismatch and missing Special-surface test remain unresolved, along with documented follow-up corrections.
13 open findings
Update config.json to version 4.1.0 · New Move softplus and sigmoid entries to Special · New Move softplus and sigmoid entries to Special · New Add missing space before the erf API link · New Fix singular grammar in the overview sentence · New Document sigmoid and softplus in the Special reference · New Update inherited-method table for Special methods · New Move sigmoid and softplus documentation to Special · New Add spacing in invalid-arity compiler errors · New Add spacing in invalid-arity compiler errors · New Add spacing in invalid-arity compiler errors · New Add spacing in invalid-arity compiler errors · New Add spacing in invalid-arity compiler errors · New
What changed in this PR
Adds rsqrt, stable softplus, erf, sinh, and cosh tensor operations across native kernels, APIs, optimizers, tests, benchmarks, and documentation.
Changes:
- Adds Vector, Matrix, and ColumnVector operations.
- Updates Zephir interfaces, generated bindings, and native C kernels.
- Adds tests, documentation, changelog, and benchmark coverage.
| File | Summary |
|---|---|
tests/VectorTest.php |
Tests new vector operations; add coverage confirming the Special interface surface. |
tests/SettingsTest.php |
Tests rsqrt dispatch. |
tests/MatrixTest.php |
Tests new matrix operations. |
tests/ColumnVectorTest.php |
Tests result types and values. |
tensor/vector.zep |
Adds vector APIs. |
tensor/unary.zep |
Adds rsqrt and moves sigmoid out of Unary. |
tensor/trigonometric.zep |
Adds sinh and cosh. |
tensor/special.zep |
Defines sigmoid, softplus, and erf. |
tensor/matrix.zep |
Adds matrix APIs. |
optimizers/TensorSoftplusOptimizer.php |
Adds softplus optimizer; fix spacing in arity diagnostics. |
optimizers/TensorSinhOptimizer.php |
Adds sinh optimizer; fix spacing in arity diagnostics. |
optimizers/TensorRsqrtOptimizer.php |
Adds rsqrt optimizer; fix spacing in arity diagnostics. |
optimizers/TensorErfOptimizer.php |
Adds erf optimizer; fix spacing in arity diagnostics. |
optimizers/TensorCoshOptimizer.php |
Adds cosh optimizer; fix spacing in arity diagnostics. |
ext/tensor/vector.zep.h |
Generated vector declarations. |
ext/tensor/vector.zep.c |
Generated vector implementations. |
ext/tensor/unary.zep.h |
Generated Unary declarations. |
ext/tensor/unary.zep.c |
Generated Unary implementations. |
ext/tensor/trigonometric.zep.h |
Generated trigonometric declarations. |
ext/tensor/trigonometric.zep.c |
Generated trigonometric implementations. |
ext/tensor/special.zep.h |
Generated Special declarations. |
ext/tensor/special.zep.c |
Generated Special implementations. |
ext/tensor/matrix.zep.h |
Generated Matrix declarations. |
ext/tensor/matrix.zep.c |
Generated Matrix implementations. |
ext/include/unary.h |
Declares native kernels. |
ext/include/unary.c |
Implements and dispatches native kernels. |
docs/Vector.md |
Documents vector methods; update Special method categorization. |
docs/Matrix.md |
Documents matrix methods; update Special method categorization. |
docs/interfaces/unary.md |
Documents Unary methods; move sigmoid and softplus entries to Special. |
docs/interfaces/trigonometric.md |
Documents hyperbolic operations. |
docs/interfaces/tensor.md |
Lists inherited methods; update interface grouping. |
docs/interfaces/special.md |
Documents Special operations; add missing method sections and correct overview wording. |
docs/index.md |
Updates the interface index; fix missing spacing in the erf entry. |
CHANGELOG.md |
Records the 4.1.0 release; align the build extension version. |
benchmarks/Unary/SoftplusMatrixBench.php |
Benchmarks softplus; move to the Special benchmark area. |
Files not reviewed (10)
- ext/tensor/matrix.zep.c: Generated file
- ext/tensor/matrix.zep.h: Generated file
- ext/tensor/special.zep.c: Generated file
- ext/tensor/special.zep.h: Generated file
- ext/tensor/trigonometric.zep.c: Generated file
- ext/tensor/trigonometric.zep.h: Generated file
- ext/tensor/unary.zep.c: Generated file
- ext/tensor/unary.zep.h: Generated file
- ext/tensor/vector.zep.c: Generated file
- ext/tensor/vector.zep.h: Generated file
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Fix formatting of the description for the Special section. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Clarify the description of the `Special` interface and correct formatting for `erf()`. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.


SoftPlus, erf(), rsqrt(), sinh(), and cosh()