[API Compatibility No.109、110 ] sink log10 and log1p into c++ -part#76381
[API Compatibility No.109、110 ] sink log10 and log1p into c++ -part#76381luotao1 merged 8 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
Pull Request Overview
This PR migrates paddle.log10 and paddle.log1p functions from Python to C++ implementation to improve performance and maintainability. The changes add PyTorch-compatible input parameter aliasing and introduce out parameter support for in-place operations.
Key changes:
- Removed Python implementations of
log10andlog1pfrompython/paddle/tensor/math.py - Added comprehensive API documentation with signatures to
python/paddle/_paddle_docs.py - Added API mapping configuration in
paddle/phi/ops/yaml/python_api_info.yaml - Added compatibility test suites covering both dygraph and static modes with multiple parameter patterns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/legacy_test/test_activation_op.py | Added comprehensive test classes TestLog10APICompatibility and TestLog1pAPI_Compatibility to verify parameter compatibility, tensor methods, and output parameter functionality |
| python/paddle/tensor/math.py | Removed Python implementations of log10 and log1p functions (now implemented in C++) and updated imports |
| python/paddle/_paddle_docs.py | Added detailed documentation and signatures for log10 and log1p functions including math formulas, parameters, return values, and usage examples |
| paddle/phi/ops/yaml/python_api_info.yaml | Registered log10 and log1p operations with Python API mappings for both module-level and tensor method access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| .. math:: | ||
|
|
||
| Out = \log_{10}x |
There was a problem hiding this comment.
[nitpick] The LaTeX formatting in the math block has inconsistent underscore usage. The formula should use proper subscript formatting:
Out = \log_{10}x
should be:
Out = \log_{10}{x}
to properly group the base and the argument, or use parentheses for clarity:
Out = \log_{10}(x)
| Out = \log_{10}x | |
| Out = \log_{10}{x} |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #76381 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 1
Lines ? 2
Branches ? 0
===========================================
Hits ? 2
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@zade23 需要解决下流水线问题 |
|
/re-run all-failed |
1 similar comment
|
/re-run all-failed |
关于CIStatic-CheckAPI签名发生了变化,但没审批。
|
|
/re-run all-failed |
…addlePaddle#76381) * sink log10 and log1p into c++ * Update test/legacy_test/test_activation_op.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/legacy_test/test_activation_op.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PR Category
User Experience
PR Types
New features
Description
下沉paddle.log10、paddle.log1p 到C++层。
任务:#76301
PaConvert:PaddlePaddle/PaConvert#755