Skip to content

Conversation

@ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Apr 25, 2025

PR Category

Auto Parallel

PR Types

New features

Description

复用了 ReductionInferSpmdBase, ReductionGradInferSpmd,属于 mean 的一种特殊情况

@paddle-bot
Copy link

paddle-bot bot commented Apr 25, 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.

@paddle-bot paddle-bot bot added the contributor External developers label Apr 25, 2025
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Apr 27, 2025
@luotao1
Copy link
Contributor

luotao1 commented Apr 28, 2025

@Yeenyeong 可以review

@luotao1 luotao1 changed the title [Auto Parallel] Add spmd rule for mean_all and mean_all_grad ops. [Auto Parallel] Add spmd rule No.6 for mean_all and mean_all_grad ops. Apr 28, 2025
self.x_dist_tensor_spec.set_dims_mapping([0, -1])
result_dist_attrs = self.rule.infer_forward(self.x_dist_tensor_spec)

inferred_input_dist_attrs = result_dist_attrs[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

94fa99191443e99fffdbfc63ff3b7333
1745815056

Before a container is accessed, its length should be checked first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

test_fused_dropout_add_rule)
py_test_modules(test_logsumexp_rule MODULES test_logsumexp_rule)
py_test_modules(test_nonzero_rule MODULES test_nonzero_rule)
py_test_modules(test_mean_all_rule MODULES test_mean_all_rule)
Copy link
Contributor

@Yeenyeong Yeenyeong Apr 28, 2025

Choose a reason for hiding this comment

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

To pass PR-CI-Hygon-DCU-Test, this line should be moved into the "if(NOT WITH_ROCM)" block which appears in next line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I have modified it in previous commit, which may not be updated yet for you ~

@ooooo-create ooooo-create requested a review from Yeenyeong April 29, 2025 04:03
jeff41404
jeff41404 previously approved these changes Apr 29, 2025
Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

@ooooo-create
Copy link
Contributor Author

/re-run approval

@luotao1
Copy link
Contributor

luotao1 commented May 8, 2025

@ooooo-create 请解决下冲突

@luotao1 luotao1 merged commit 8201006 into PaddlePaddle:develop May 9, 2025
64 of 66 checks passed
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@ Coverage Diff @@ ## develop #72479 +/- ## =========================================== Coverage ? 100.00% =========================================== Files ? 1 Lines ? 7 Branches ? 0 =========================================== Hits ? 7 Misses ? 0 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.
@luotao1 luotao1 changed the title [Auto Parallel] Add spmd rule No.6 for mean_all and mean_all_grad ops. [Auto Parallel] Add spmd rule No.5 for mean_all and mean_all_grad ops. May 14, 2025
GITD245 pushed a commit to GITD245/Paddle that referenced this pull request May 14, 2025
PaddlePaddle#72479) * add spmd rule for pd_op.mean_all * Fix test config for shape and dims_mapping * refine and add cpp tests * reuse ReductionInfer to MeanAll
@luotao1 luotao1 added HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 and removed HappyOpenSource 快乐开源活动issue与PR labels May 14, 2025
@ooooo-create ooooo-create deleted the add_spmd_mean_all branch September 29, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

6 participants