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

add type promotion logic for eager between tensor and tensor #59518

Merged
merged 23 commits into from
Dec 7, 2023

Conversation

zxcd
Copy link
Contributor

@zxcd zxcd commented Nov 29, 2023

PR types

New features

PR changes

Others

Description

Card-64022
add type promotion logic for eager between tensor and tensor.

stage 1 will only support float in "+ - *, where" API.
Example like:

>>> a = paddle.randn((2,3), dtype='float32')
>>> b = paddle.randn((2,3), dtype='float64')
>>> out = a + b

# Before, dtype of out would be same to the former one, i.e. a
>>> out.dtype
<VarType.FP32: 5>

# Now, dtype will be promote to float64
>>> out
<VarType.FP64: 6>

Copy link

paddle-bot bot commented Dec 1, 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.

jeff41404
jeff41404 previously approved these changes Dec 5, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants