-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[API Compatibility No.360] Sink paddle.inverse to cpp -part #77078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #77078 +/- ##
===========================================
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:
|
|
/re-run all-failed |
| """, | ||
| ) | ||
|
|
||
| add_doc_and_signature( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以往这个文件里的中间插入,不然PR容易前后自己冲突。
zhwesky2010
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR冲突了,_paddle_docs.py这个文件容易冲突。可以都往最后面加。
| ) | ||
|
|
||
|
|
||
| add_doc_and_signature( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gcd下沉了吗,没下沉直接在python api的位置维护文档和签名,这里不需要加。
| ) | ||
|
|
||
|
|
||
| add_doc_and_signature( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些都是用于c++下沉的
python/paddle/tensor/math.py
Outdated
| out_res, _ = paddle.static.nn.while_loop( | ||
| _gcd_cond_fn, _gcd_body_fn, [x, y] | ||
| ) | ||
| if out is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上下两个out分支可以合并下处理
python/paddle/tensor/math.py
Outdated
|
|
||
| @param_two_alias(['x', 'input'], ['y', 'other']) | ||
| def gcd(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: | ||
| @ParamAliasDecorator({"x": ["input"], "y": ["other"]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个装饰器性能要比param_two_alias差点,后面还是可以直接用param_two_alias
Co-authored-by: Nyakku Shigure <[email protected]>
Co-authored-by: Nyakku Shigure <[email protected]>
|
/re-run all-failed |
zhwesky2010
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
冲突需要重新处理下。
zhwesky2010
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@Manfredss 这个PR review已经没问题了,但是还有很多CI没有通过,尽快看下,不然阻碍无法合入。 |
… ApiEnhance_inverse
|
/re-run all-failed |
|
@Manfredss 冲突了 |
… ApiEnhance_inverse
… ApiEnhance_inverse
cdc20e0 to
7aef806
Compare
python/paddle/_paddle_docs.py
Outdated
| [[0.50000000, 0. ], | ||
| [0. , 0.50000000]]) | ||
| """, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缩进不符合规范,参考目前其他的add_doc_and_signature
python/paddle/tensor/math.py
Outdated
|
|
||
| @param_two_alias(['x', 'input'], ['y', 'other']) | ||
| def gcd(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: | ||
| @ParamAliasDecorator({"x": ["input"], "y": ["other"]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不需要改了
python/paddle/tensor/math.py
Outdated
|
|
||
| @param_two_alias(['x', 'input'], ['y', 'other']) | ||
| def lcm(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: | ||
| @ParamAliasDecorator({"x": ["input"], "y": ["other"]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要改了
python/paddle/tensor/math.py
Outdated
| @param_two_alias(['x', 'input'], ['y', 'other']) | ||
| def gcd(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: | ||
| @ParamAliasDecorator({"x": ["input"], "y": ["other"]}) | ||
| def gcd( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out参数未覆盖
|
/re-run all-failed |
test/legacy_test/test_inverse_op.py
Outdated
| paddle.disable_static() | ||
| x = paddle.to_tensor(self.np_input) | ||
|
|
||
| # 使用所有支持的别名进行测试 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码库里不要加中文
|
/re-run all-failed |
|
@Manfredss 这个下沉后有些case无法通过了,你本地测试下看什么问题。 |
这个测试文件里为什么是 @pytest.mark.api_linalg_det_vartype 而不是 @pytest.mark.api_linalg_inv_vartype? if isfunction(func)判断改为 if isfunction(func) or callable(func) and not hasattr(func, '__mro__')使其能够正确识别 |
在paddle/_init_.py最后会
|
我看看 |



PR Category
User Experience
PR Types
New features
Description
Sink paddle.inverse to cpp
Add param alias for x
Add new param out