-
Couldn't load subscription status.
- Fork 5.9k
[0-size Retest] fix send_ue_recv、lu、mean 0-size #74150
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
[0-size Retest] fix send_ue_recv、lu、mean 0-size #74150
Conversation
| 你的PR提交成功,感谢你对开源项目的贡献! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## develop #74150 +/- ## ========================================== Coverage ? 90.00% ========================================== Files ? 3 Lines ? 10 Branches ? 0 ========================================== Hits ? 9 Misses ? 1 Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| phi::Full<int, Context>(dev_ctx, | ||
| phi::IntArray(common::vectorize(infos->dims())), | ||
| static_cast<T>(0), | ||
| infos); | ||
| phi::Full<int, Context>(dev_ctx, | ||
| phi::IntArray(common::vectorize(pivots->dims())), | ||
| static_cast<T>(0), | ||
| pivots); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static_cast<T>(0)和Full<int, Context>数据类型应该保持一致。
| phi::Full<int, Context>(dev_ctx, | ||
| phi::IntArray(common::vectorize(infos->dims())), | ||
| static_cast<T>(0), | ||
| infos); | ||
| phi::Full<int, Context>(dev_ctx, | ||
| phi::IntArray(common::vectorize(pivots->dims())), | ||
| static_cast<T>(0), | ||
| pivots); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int和T要保持一致
| if (x.numel() == 0 && std::is_same<T, int>::value) { | ||
| phi::Full<T, Context>( | ||
| dev_ctx, phi::IntArray(common::vectorize(out->dims())), 0, out); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉这部分的逻辑有点问题,为什么仅单独处理 int 类型呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为了和torch结果对齐,torch在int32时,填充的是0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那 int64 和 bool 呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mean 的 0size 我之前修过;我认为应该都是 nan,元素个数为 0,mean 除 0 无数学意义
@DanielSun11 这个是否要再商量商量?
| /re-run all-failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| phi::Full<T, Context>( | ||
| dev_ctx, phi::IntArray(common::vectorize(out->dims())), 0, out); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请按照之前的修复方案处理int数据类型。不需要填充为0
PR Category
Operator Mechanism
PR Types
Bug fixes
Description
send_ue_recv 修复前存在问题:


send_ue_recv 修复后测试结果:
lu 修复前存在问题:


lu 修复后测试结果:
mean int32在cpu情况下认为是torch的错误,paddle的行为是正确的。
pcard-67164