[0-size Retest] fix send_ue_recv、lu、mean 0-size#74150
[0-size Retest] fix send_ue_recv、lu、mean 0-size#74150DanielSun11 merged 9 commits intoPaddlePaddle:developfrom
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:
|
| 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.
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); |
| 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.
感觉这部分的逻辑有点问题,为什么仅单独处理 int 类型呢?
There was a problem hiding this comment.
为了和torch结果对齐,torch在int32时,填充的是0
There was a problem hiding this comment.
mean 的 0size 我之前修过;我认为应该都是 nan,元素个数为 0,mean 除 0 无数学意义
@DanielSun11 这个是否要再商量商量?
|
/re-run all-failed |
| phi::Full<T, Context>( | ||
| dev_ctx, phi::IntArray(common::vectorize(out->dims())), 0, out); | ||
| return; | ||
| } |
There was a problem hiding this comment.
请按照之前的修复方案处理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