Skip to content

Conversation

@co63oc
Copy link
Contributor

@co63oc co63oc commented May 30, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

paddle.dist
修改前向,反向,GPU反向和CPU反向相同
infermeta 删除numel为0判断,symbolic_shape中没有对应代码


image

kernel 修改 cpu/gpu,前向和反向返回填充0

PaddleAPITest 测试已修复cuda error, 返回是torch error
image

paddle.diagonal
修改前向和反向,前向返回填充0
infermeta 没有修改
kernel 修改 cpu/gpu/stride
PaddleAPITest 测试已修复cuda error, 返回是torch error
image

paddle.kthvalue
修改前向和反向
infermeta中有axis维度不能为0的检查,和torch检查相同,没有修改
kernel 修改cpu/gpu

PaddleAPITest 已修改cuda error
image

torch axis维度检查

python engine.py --accuracy=True --api_config='paddle.kthvalue(Tensor([0],"float32"), 1, )'

image

paddle.logaddexp 是python端算子,原有错误为subtract算子错误,subtract已修复,
当前PR是增加单测

PaddleAPITest 测试没有cuda error,paddle error 为测试用例形状 broadcast 错误,x, y为0的维度对应的其他值不能大于1
image

@paddle-bot
Copy link

paddle-bot bot commented May 30, 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 May 30, 2025
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label May 30, 2025
@co63oc co63oc changed the title [0-size Tensor No.48] Add 0-size Tensor support for dist [0-size Tensor No.45、48、298] Add 0-size Tensor support for dist/diagonal May 30, 2025
@co63oc co63oc changed the title [0-size Tensor No.45、48、298] Add 0-size Tensor support for dist/diagonal [0-size Tensor No.45、48、298、99、310] Add 0-size Tensor support for dist/diagonal/kthvalue May 30, 2025
@co63oc co63oc changed the title [0-size Tensor No.45、48、298、99、310] Add 0-size Tensor support for dist/diagonal/kthvalue [0-size Tensor No.45、48、298、99、310、124] Add 0-size Tensor support for dist/diagonal/kthvalue/logaddexp Jun 2, 2025
@co63oc
Copy link
Contributor Author

co63oc commented Jun 2, 2025

CI不是修改代码错误


class TestDistOp_ZeroSize(TestDistOp):
def init_case(self):
self.x_shape = (0, 1, 5, 6)
Copy link
Contributor

Choose a reason for hiding this comment

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

单测是否可以增加一个x 或 y 只有一个为0 size Tensor的case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

phi::Full<T, Context>(
dev_ctx, phi::IntArray(common::vectorize(output->dims())), NAN, output);
phi::Full<int64_t, Context>(
dev_ctx, phi::IntArray(common::vectorize(indices->dims())), 0, indices);
Copy link
Contributor

Choose a reason for hiding this comment

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

output设置为nan没问题。indices设置为0,这个和torch对比过了吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indices 类型是int64_t, int64_t类型没有nan

@DanielSun11
Copy link
Contributor

其他修改没有问题了

@CLAassistant
Copy link

CLAassistant commented Jun 3, 2025

CLA assistant check
All committers have signed the CLA.

@luotao1
Copy link
Contributor

luotao1 commented Jun 4, 2025

https://github.com/PaddlePaddle/Paddle/pull/73027/commits CLA签署有问题,里面有commit是Your Name提交的

@co63oc
Copy link
Contributor Author

co63oc commented Jun 5, 2025

/re-run all-failed

@co63oc
Copy link
Contributor Author

co63oc commented Jun 5, 2025

@luotao1 CI已完成

Copy link
Contributor

@DanielSun11 DanielSun11 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

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

这个修改了DistInferMeta,但没有修改符号推导,请 @luotao1 协调云飞帮忙确认一下。

@luotao1 luotao1 merged commit 72c20df into PaddlePaddle:develop Jun 6, 2025
48 of 49 checks passed
@co63oc co63oc deleted the b51 branch June 14, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants