Skip to content
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

[Reshard] reshard from partial to replicated in same placement #56975

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

LiYuRio
Copy link
Contributor

@LiYuRio LiYuRio commented Sep 5, 2023

PR types

New features

PR changes

Others

Description

Pcard-73145

Reshard方面:

  • 新增从partial到replicated的转换,通过直接调用all_reduce通信得到全量的数据。

丰富语义:

  • Reshard以设备为中心,在设备间完成重切分,目前从tensor视角描述的TensorDistAttr存在表达能力不足的问题。为此,提供tensor到设备视角的转换,方便reshard对当前状态进行判断。

@paddle-bot
Copy link

paddle-bot bot commented Sep 5, 2023

你的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.

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM for set_tests_properties(test_reshard_p_to_r PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 100)

Copy link
Contributor

@JZ-LIANG JZ-LIANG left a comment

Choose a reason for hiding this comment

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

LGTM and might revise in next PR

errors::InvalidArgument(
"Partial axis %ld can not exceed the ndim of process_mesh %ld",
itr.first,
ndim));
Copy link
Contributor

Choose a reason for hiding this comment

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

could be better to double check here that the dim to partial is not be used as sharded.

"Split axis %ld can not exceed the ndim of process_mesh %ld",
dims_mapping_[i],
ndim));
placement[dims_mapping_[i]] = std::make_shared<ShardStatus>(i);
Copy link
Contributor

Choose a reason for hiding this comment

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

why shared_ptr ? the return placement is supposed for temporary usage and should not be hold by others.

@chenwhql chenwhql merged commit f839e82 into PaddlePaddle:develop Sep 8, 2023
25 of 26 checks passed
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants