-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Complex] Support compleex64/128 for paddle.uniform #76117
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
[Complex] Support compleex64/128 for paddle.uniform #76117
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #76117 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 2
Lines ? 17
Branches ? 0
===========================================
Hits ? 17
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f9121f0 to
01c7810
Compare
wanghuancoder
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
23d449e
into
PaddlePaddle:develop
PR Category
Operator Mechanism
PR Types
New features
Description
Pcard-75624
支持 cuda、xpu 设备的
paddle.uniform复数类型,对实部和虚部分别 uniform 后拼接成复数大Tensor显存测试代码:
This pull request adds support for generating random numbers from a uniform distribution for complex data types (
complex64andcomplex128) in Paddle's GPU kernel and Python API. The changes include updates to both backend CUDA kernel logic and the Python interface, as well as additional tests to ensure correct behavior.Complex uniform random support:
uniform_kernel.cu) now handlescomplex64andcomplex128types by generating real and imaginary parts separately and combining them. This includes logic for both global and operator-specific seeds.phi::complex64andphi::complex128, enabling dispatch for these types.Python API and documentation:
uniformfunction now documents and acceptscomplex64andcomplex128as supported dtypes. [1] [2]Testing:
np.complex64andnp.complex128intest_uniform_random_op.py.Other:
uniform_kernel.cuto support complex types and type traits.