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

[PIR] A-12 Adapt concat test_errors #61036

Merged

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented Jan 23, 2024

PR types

Others

PR changes

Others

Description

Copy link

paddle-bot bot commented Jan 23, 2024

你的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 Jan 23, 2024
@enkilee enkilee changed the title Add test_with_pir_api in error test A-12 concat [PIR] A-12 Adapt concat test_errors Jan 24, 2024
@0x45f
Copy link
Contributor

0x45f commented Jan 29, 2024

create_lod_tensor这个接口在pir下没有适配,后面应该也不会适配了,所以本PR里的涉及到的两个test_error单测不需要适配,先恢复原样吧。可以尝试加一个新的测试error的case,老静态图和PIR下都可以跑,然后用test_with_pir_api装饰一下~

@enkilee
Copy link
Contributor Author

enkilee commented Jan 29, 2024

create_lod_tensor这个接口在pir下没有适配,后面应该也不会适配了,所以本PR里的涉及到的两个test_error单测不需要适配,先恢复原样吧。可以尝试加一个新的测试error的case,老静态图和PIR下都可以跑,然后用test_with_pir_api装饰一下~

收到,我看合入的示例里面还是create_lod_tensor,我改的试试。

@0x45f
Copy link
Contributor

0x45f commented Feb 2, 2024

这里应该是PIR CPP端的检查逻辑不够完善,我来修改一下~

if (vector_value.size() <= 1) {
return true;
}
auto dtype = GetValueDataType(vector_value[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

这里为何只取index为0的元素进行比较

Copy link
Contributor

Choose a reason for hiding this comment

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

这个函数是检查vector中的value的dtype是否全都相同,所以取了第0个元素进行比较

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM for docs

@0x45f 0x45f merged commit 9b87d22 into PaddlePaddle:develop Feb 21, 2024
30 checks passed
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.

7 participants