Skip to content

[Auto Parallel] Add spmd rule No.1 for topk and topk_grad ops #72499

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

Merged
merged 11 commits into from
May 12, 2025

Conversation

ooooo-create
Copy link
Contributor

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

PR Category

Auto Parallel

PR Types

New features

Description

目前将 axis 维度强制为 Replicated

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 luotao1 changed the title [Auto Parallel] Add spmd rule for topk and topk_grad ops [Auto Parallel] Add spmd rule No.1 for topk and topk_grad ops Apr 28, 2025
@ooooo-create
Copy link
Contributor Author

/re-run clone

@ooooo-create
Copy link
Contributor Author

@Yeenyeong This pr add the spmd rule for topk and topk_grad, now is ready to be reviewed, Thanks!

inferred_input_dist_attrs = result_dist_attrs[0]
inferred_output_dist_attrs = result_dist_attrs[1]

self.assertEqual(len(result_dist_attrs), 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Checking length should be done before a container is accessed.

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

@luotao1
Copy link
Contributor

luotao1 commented May 9, 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

@luotao1 luotao1 merged commit 6fc7d44 into PaddlePaddle:develop May 12, 2025
44 of 48 checks passed
@luotao1 luotao1 added HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 and removed HappyOpenSource 快乐开源活动issue与PR labels May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants