Skip to content

Conversation

@zhengshengning
Copy link
Contributor

@zhengshengning zhengshengning commented Jul 21, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

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

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

mean int32在cpu情况下认为是torch的错误,paddle的行为是正确的。

pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Jul 21, 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.

@zhengshengning zhengshengning changed the title fix send_ue_recv 0-size [0-size Tensor Job2 No.21-23] fix send_ue_recv 0-size Jul 21, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (develop@f756146). Learn more about missing BASE report.

Files with missing lines Patch % Lines
paddle/phi/kernels/cpu/lu_kernel.cc 85.71% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@zhengshengning zhengshengning changed the title [0-size Tensor Job2 No.21-23] fix send_ue_recv 0-size [0-size Retest] fix send_ue_recv 0-size Jul 22, 2025
@zhengshengning zhengshengning changed the title [0-size Retest] fix send_ue_recv 0-size [0-size Retest] fix send_ue_recv、lu 0-size Jul 22, 2025
@zhengshengning zhengshengning changed the title [0-size Retest] fix send_ue_recv、lu 0-size [0-size Retest] fix send_ue_recv、lu、mean 0-size Jul 22, 2025
wanghuancoder
wanghuancoder previously approved these changes Jul 24, 2025
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.

LGTM

Comment on lines 202 to 209
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);
Copy link
Contributor

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>数据类型应该保持一致。

Comment on lines 39 to 46
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);
Copy link
Contributor

Choose a reason for hiding this comment

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

int和T要保持一致

Comment on lines 34 to 38
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;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

感觉这部分的逻辑有点问题,为什么仅单独处理 int 类型呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

为了和torch结果对齐,torch在int32时,填充的是0

Copy link
Contributor

Choose a reason for hiding this comment

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

那 int64 和 bool 呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NAN

Copy link
Contributor

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 这个是否要再商量商量?

@zhengshengning
Copy link
Contributor Author

/re-run all-failed

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

phi::Full<T, Context>(
dev_ctx, phi::IntArray(common::vectorize(out->dims())), 0, out);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

请按照之前的修复方案处理int数据类型。不需要填充为0

@DanielSun11 DanielSun11 merged commit f6b1c15 into PaddlePaddle:develop Jul 25, 2025
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants