-
Notifications
You must be signed in to change notification settings - Fork 274
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
[Hackathon 4th No.10] 为 paddle 新增 paddle.copysign API #367
Conversation
Ainavo
commented
Feb 21, 2023
•
edited
Loading
edited
- 【PaddlePaddle Hackathon 第四期】任务总览 Paddle#51281
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.
你好,非常感谢反馈-0处的行为问题。
从文档的调研部分来看,除下列列出的细节小问题外,有两个问题需要特别提出:
- 在-0时的表现问题,如果等到支持signbit以后再改回来适配,属于不兼容升级,这是需要尽力避免的情况
- copysign在Pytorch中是存在kernel的,可以再补充调研一下,底层实现逻辑不算太复杂。
综合考虑,这个API是否通过底层kernel的实现更为合适
|
||
代码如下: | ||
|
||
Pytorch 中具体使用 `python` 实现,[代码](https://cs.github.com/pytorch/pytorch/blob/4d753b50451607b3314f827993df7e5527f0c0a7/torch/_refs/__init__.py#L1033)如下: |
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.
这里需要同时列举下torch中kernel的实现情况 ,如这里
辛苦 @zoooo0820 有时间再 review 一下,不知道对 torch 中 copysign 函数的实现逻辑的描述是否正确,希望能得到修改意见~ |
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