-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[API Compatibility] Add out support for 11 APIs #74592
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?
[API Compatibility] Add out support for 11 APIs #74592
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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
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/creation.py
Outdated
out (Tensor|None, optional): The output tensor. Default: None. | ||
name(str|None, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: 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.
可以帮忙给这个 API 也加一下类型提示么?
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.
Done
python/paddle/tensor/creation.py
Outdated
out: paddle.Tensor | None = None, | ||
name: str | None = 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.
问一下,这些 API 里的 out
和 name
是否应该作为「仅关键字参数」呢?即 3397
行前是不是应该加一个 *
?只是疑问 @zhwesky2010
fdce7a4
/re-run all-failed |
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
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (86.84%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #74592 +/- ##
==========================================
Coverage ? 86.84%
==========================================
Files ? 5
Lines ? 38
Branches ? 0
==========================================
Hits ? 33
Misses ? 5
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/re-run all-failed |
32a1211
@@ -1241,7 +1195,9 @@ def remainder_(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: | |||
""" | |||
|
|||
|
|||
def multiply(x: Tensor, y: Tensor, name: str | None = None) -> Tensor: | |||
def multiply( |
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.
这个能下沉吗
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.
这个不在 ops.yaml 中
) | ||
create_test_act_bf16_class( | ||
TestRsqrt, check_prim=True, check_pir=True, check_prim_pir=True | ||
TestRsqrt, check_prim=False, check_pir=True, check_prim_pir=True |
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.
单测这些改动是因为跑不过吗
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.
是的,check_prim 是测旧静态图的。
/re-run all-failed |
/re-run all-failed |
2 similar comments
/re-run all-failed |
/re-run all-failed |
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
/re-run all-failed |
1 similar comment
/re-run all-failed |
PR Category
User Experience
PR Types
New features
Description
为 11 个 API 添加 out 、参数映射、下沉 C++,并添加对应单元测试。具体清单为:
paddle.polar
paddle.stack
paddle.cos
paddle.floor
paddle.log
paddle.pow
paddle.rsqrt
paddle.sign
paddle.sin
paddle.multiply
其中,multiply 由于不在 ops.yaml 清单中,留给 @DanielSun11 下沉至 C++。
下沉到 C++ 的算子不再支持就旧静态图组网,涉及到这部分的单测直接注释。