Skip to content

Conversation

aquagull
Copy link
Contributor

@aquagull aquagull commented Apr 9, 2025

PR Category

User Experience

PR Types

Bug fixes

Description

修正sum输入为0-size时dtype不正确问题。
复现代码

import paddle
x1 = paddle.zeros(shape=[0,1, 1], dtype='int32')
x1.sum(axis=0,dtype=x1.dtype)
print(x1.dtype)
<DataType.INT64: 9>

Copy link

paddle-bot bot commented Apr 9, 2025

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Apr 9, 2025
Copy link
Contributor

@HydrogenSulfate HydrogenSulfate left a comment

Choose a reason for hiding this comment

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

补充单测

Copy link
Contributor

@HydrogenSulfate HydrogenSulfate left a comment

Choose a reason for hiding this comment

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

LGTM

@HydrogenSulfate HydrogenSulfate merged commit fe383c8 into PaddlePaddle:develop Apr 17, 2025
36 of 37 checks passed
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
* fix sumraw

* add test

* empty

* fix
@aquagull aquagull deleted the sumraw branch August 8, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants