-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[API Compatibility No.359、378] param alias for deg2rad -part #77168
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提交成功,感谢你对开源项目的贡献! |
Removed commented-out implementation and documentation for the tangent operator.
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (66.66%) 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 #77168 +/- ##
==========================================
Coverage ? 66.66%
==========================================
Files ? 1
Lines ? 12
Branches ? 0
==========================================
Hits ? 8
Misses ? 4
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/re-run all-failed |
python/paddle/tensor/math.py
Outdated
| if in_dynamic_or_pir_mode(): | ||
| if convert_dtype(x.dtype) in ['int32', 'int64']: | ||
| x = cast(x, dtype="float32") | ||
| 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.
_C_ops会自动处理out=None的情况,无需再额外判断,直接透传。
| args_mapper : | ||
| func : ArgSumMapper | ||
|
|
||
| - op : tan |
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.
tan已经下沉了,这个PR不用再改了。只用修改deg2rad即可。
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
|
看看CI问题 |
… ApiEnhance361_378
python/paddle/tensor/math.py
Outdated
| x = cast(x, dtype="float32") | ||
| return _C_ops.scale(x, deg2rad_scale, 0.0, True) | ||
| _C_ops.scale(x, deg2rad_scale, 0.0, True, out=out) | ||
| return out |
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.
这个return看起来不太对?直接return _C_ops.scale(x, deg2rad_scale, 0.0, True, out=out)
… ApiEnhance361_378
|
/re-run all-failed |
| if convert_dtype(x.dtype) in ['int32', 'int64']: | ||
| x = cast(x, dtype="float32") | ||
| return _C_ops.scale(x, deg2rad_scale, 0.0, True) | ||
| if in_pir_mode(): |
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.
不用区分pir了,dygraph测out就行。
这里直接:return _C_ops.scale(x, deg2rad_scale, 0.0, True, out=out)
|
|
||
| # Test out | ||
| out = paddle.zeros([1], dtype="float32") | ||
| res = paddle.deg2rad(x, out=out) |
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.
PIR无需测out
PR Category
User Experience
PR Types
New features
Description
add param alias for paddle.deg2rad