Skip to content
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 5th No.13】为 Paddle 新增 signbit API #57882

Merged
merged 46 commits into from
Dec 19, 2023

Conversation

PommesPeter
Copy link
Contributor

@PommesPeter PommesPeter commented Oct 6, 2023

PR types

Others

PR changes

APIs

Description

Added signbit API to paddle.

文档 pr: PaddlePaddle/docs#6340

说明:

@paddle-bot
Copy link

paddle-bot bot commented Oct 6, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@luotao1
Copy link
Contributor

luotao1 commented Oct 10, 2023

在实现过程中发现 paddle.sign 暂时不支持 int 类型的数据
目前 paddle less_than 算子不支持 int8 类型

能否完善下:paddle.sign 对 int 类型的支持 & less_than 对 int8 类型的支持,torch.signbit 对这几个类型都是支持的。

@PommesPeter
Copy link
Contributor Author

PommesPeter commented Oct 10, 2023

在实现过程中发现 paddle.sign 暂时不支持 int 类型的数据
目前 paddle less_than 算子不支持 int8 类型

能否完善下:paddle.sign 对 int 类型的支持 & less_than 对 int8 类型的支持,torch.signbit 对这几个类型都是支持的。

可以的,需要另外新开 pr 吗,还是同步和这个 pr 一起解决呢

@luotao1
Copy link
Contributor

luotao1 commented Oct 10, 2023

可以的,需要另外新开 pr 吗,还是同步和这个 pr 一起解决呢

可以新开两个PR,1个PR解决一个API的类型问题

@PommesPeter
Copy link
Contributor Author

可以的,需要另外新开 pr 吗,还是同步和这个 pr 一起解决呢

可以新开两个PR,1个PR解决一个API的类型问题

好的没问题,顺便问一下可以算作快乐开源贡献吗哈哈哈哈

@luotao1
Copy link
Contributor

luotao1 commented Oct 10, 2023

顺便问一下可以算作快乐开源贡献吗哈哈哈哈

关联 PR 都属于黑客松的

@PommesPeter
Copy link
Contributor Author

顺便问一下可以算作快乐开源贡献吗哈哈哈哈

关联 PR 都属于黑客松的

好的

@PommesPeter
Copy link
Contributor Author

那目前就是先解决类型问题,类型问题合入后再合入 signbit api

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 18, 2023

Sorry to inform you that 0ebade0's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

python/paddle/tensor/math.py Outdated Show resolved Hide resolved
python/paddle/tensor/math.py Outdated Show resolved Hide resolved
@luotao1
Copy link
Contributor

luotao1 commented Dec 12, 2023

需要解决下CodeStyle问题

@PommesPeter
Copy link
Contributor Author

需要解决下CodeStyle问题

好的 已解决

jeff41404
jeff41404 previously approved these changes Dec 13, 2023
Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1
Copy link
Contributor

luotao1 commented Dec 14, 2023

PR-CI-Codestyle-Check 需要过一下

python/paddle/tensor/math.py Outdated Show resolved Hide resolved
python/paddle/tensor/math.py Outdated Show resolved Hide resolved
Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 34a2ffa into PaddlePaddle:develop Dec 19, 2023
29 checks passed
HermitSun pushed a commit to HermitSun/Paddle that referenced this pull request Dec 21, 2023
* refactor: added basic code of signbit

* ✨ Refactor: added signbit API

* 🦺 Fix: updated test case

* ✏️ Fix: remove int8 support

* ✨ Refactor: added int support to sign and less_than op

* 🎨 Fix: updated code style

* ✨ Refactor: added int8 support for less_than gpu kernel

* Update test_sign_op.py

* Update test_sign_op.py

* Update sign_kernel.cc

* Update compare_kernel.cc

* Update compare_kernel.cu

* ✏️ Fix: fixed indent error

* ✏️ Fix: fixed type

* ✏️ Fix: fixed typo

* Refactor: added uint8 support to sign and updated test case

* 🎨 Refactor: updated code style

* 🚚 Refactor: moved uint8 support for sign to PaddlePaddle#59514

* 🚚 Refactor: moved uint8 support for sign to PaddlePaddle#59514

* ♻️ Refactor: added uint8 type

* ✏️ Fix: updated test case

* Fix: fixed intent error

* Delete paddle/fluid/ir/dialect/paddle_dialect/ir/generated/pd_ops.parsed.yaml

* Delete paddle/fluid/ir/dialect/paddle_dialect/ir/generated/pd_ops_backward.parsed.yaml

* ♻️ Fixed commit

* Fixed commit

* 🎨 Fixed commit

* ✏️ Fixed commit

* 📝 Updated docs

* updated docs

* Update python/paddle/tensor/math.py

Co-authored-by: zachary sun <[email protected]>

* Update python/paddle/tensor/math.py

Co-authored-by: zachary sun <[email protected]>

* 🎨 Updated code style

* ✏️ Fixed doc error

* ✏️ Fixed doc error

* 📝 Fixed doc error

* 📝 Fixed doc

* Update test_signbit.py

* ✅ Updated test case

* ✅ Updated test case

* 🐛 Fixed logical error

---------

Co-authored-by: zachary sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants