Skip to content

【快乐开源】Paddle Tensor 规范化二期 test_inv&test_linalg_matmul #72574

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

mayiru1021
Copy link

PR Category

【快乐开源】Paddle Tensor 规范化二期 0-size test_inv&test_linalg_matmul两个单测

PR Types

修复test_inv&test_linalg_matmul的0-size输入情况

Description

目前 test_inv可以通过单测,但存在生成两类输入时由于涉及到的算子不支持复数或0-size导致输入生成失败的问题

微信图片_20250504151442

Copy link

paddle-bot bot commented May 4, 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.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


mayiru1021 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


mayiru1021 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@paddle-bot paddle-bot bot added the contributor External developers label May 4, 2025
@HydrogenSulfate
Copy link
Contributor

抱歉回复的比较晚,0-size和复数类型支持是paddle Tensor规范化项目的目的之一,所以如果遇到这类问题,可以尝试对涉及到的算子进行支持和完善,另外你的报错看起来是where没支持复数,在 #72247 中进行了支持,你可以尝试使用develop版的paddle重新运行试试

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label May 8, 2025
@luotao1
Copy link
Contributor

luotao1 commented May 9, 2025

需要签署下CLA

@mayiru1021
Copy link
Author

抱歉回复的比较晚,0-size和复数类型支持是paddle Tensor规范化项目的目的之一,所以如果遇到这类问题,可以尝试对涉及到的算子进行支持和完善,另外你的报错看起来是where没支持复数,在 #72247 中进行了支持,你可以尝试使用develop版的paddle重新运行试试

感谢回复,test_linalg.py::test_inv已经可以通过单测

@mayiru1021
Copy link
Author

需要签署下CLA

好的,已经签署了

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.

感谢提交PR,还麻烦增加两个对应的单测,分别测试 0-size 的inv和matmul

Copy link
Contributor

Choose a reason for hiding this comment

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

这个文件跟本PR有关系吗?

Comment on lines 288 to 291
// PADDLE_ENFORCE_NOT_NULL(
// x_data, errors::InvalidArgument("The input X should not be empty."));
// PADDLE_ENFORCE_NOT_NULL(
// y_data, errors::InvalidArgument("The input Y should not be empty."));
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的注释,可以直接删掉吧

Copy link
Author

Choose a reason for hiding this comment

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

inv部分的test发现主要是由于这里的elementwise_base的问题导致的,同时在测试matmul时,发现以下几个报错主要是和测试文件有关:
bcdd9506ce6b2afec4120d1e1d802dd
ff11550e75fedffb32e72b7a076dafa
947e934100fc3e7d388727f84c226b4
请问怎么解决比较合适呢?以及matmul中是否也要支持标量乘法
40bfef1346369173a9f269e29cdf1b0

Copy link
Contributor

Choose a reason for hiding this comment

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

inv部分的test发现主要是由于这里的elementwise_base的问题导致的,同时在测试matmul时,发现以下几个报错主要是和测试文件有关: bcdd9506ce6b2afec4120d1e1d802dd ff11550e75fedffb32e72b7a076dafa 947e934100fc3e7d388727f84c226b4 请问怎么解决比较合适呢?以及matmul中是否也要支持标量乘法 40bfef1346369173a9f269e29cdf1b0

这里可以麻烦看下具体是什么paddle的算子不支持 0-size吗?以及可以提供一个最小复现代码吗?

@luotao1
Copy link
Contributor

luotao1 commented May 21, 2025

@mayiru1021 test_inv可以通过的话,可以单独提一个PR先把修复test_inv的部分,给合入

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants