[API compatibility NO.88]Sinking lgamma into C++ -part#78212
[API compatibility NO.88]Sinking lgamma into C++ -part#78212luotao1 merged 6 commits intoPaddlePaddle:developfrom
Conversation
… and _paddle_docs.py
|
你的PR提交成功,感谢你对开源项目的贡献! |
|
|
zhwesky2010
left a comment
There was a problem hiding this comment.
删除掉 setup-checkpoint.py 这个文件的修改
|
请问现在可以了吗@zhwesky2010 |
|
冲突了 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #78212 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 1
Lines ? 1
Branches ? 0
===========================================
Hits ? 1
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| ) | ||
|
|
||
| # Exception parameters | ||
| with self.assertRaises(ValueError): |
| # Mixed arguments | ||
| out5 = paddle.lgamma(x, name=None) | ||
|
|
||
| exe = paddle.static.Executor(paddle.CPUPlace()) |
| paddle_dygraph_out.append(out4) | ||
|
|
||
| # Mixed arguments | ||
| out5 = paddle.lgamma(x, name=None) |
| paddle_dygraph_out.append(out8) | ||
|
|
||
| # Tensor method - kwargs | ||
| out9 = x.lgamma(name=None) |
| # Tensor method | ||
| out4 = x.lgamma() | ||
| # Mixed arguments | ||
| out5 = paddle.lgamma(x, name=None) |
python/paddle/_paddle_docs.py
Outdated
| x (Tensor): Input Tensor. Must be one of the following types: bfloat16, float16, float32, float64, | ||
| uint8, int8, int16, int32, int64. Alias: ``input``. | ||
| name (str|None, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`. | ||
| out (Tensor, optional): The output Tensor. If set, the result will be stored in this Tensor. Default: None. |
Merge upstream/develop into develop
PR Category
Operator Mechanism
PR Types
Improvements
Description
新增
lgamma的参数别名映射配置- 在
paddle/phi/ops/yaml/python_api_info.yaml增加:op: lgammaname: [paddle.lgamma, paddle.Tensor.lgamma]args_alias.use_default_mapping: True(支持input -> x)下沉 Python 实现到 C++ 调度
python/paddle/tensor/math.py的_C_ops导入列表中加入lgammadef lgamma(...)的 Python 逻辑实现,统一走 C++ 侧参数解析与调度补充 API 文档与签名
python/paddle/_paddle_docs.py增加add_doc_and_signature("lgamma", ...)Alias: input说明out参数与Keyword args描述,签名更新为带out的形式新增兼容性测试
test/legacy_test/test_api_compatibility.py增加TestLgammaAPITensor方法调用、out(动态图)及异常参数校验验证
cmake .. && make -j$(nproc)是否引起精度变化
否