Skip to content

refine pir dist to_static to support master weight #65089

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 3 commits into from
Jun 19, 2024

Conversation

zhiqiu
Copy link
Contributor

@zhiqiu zhiqiu commented Jun 12, 2024

PR Category

Auto Parallel

PR Types

Bug fixes

Description

ATT

  • unify the function of convert placements to dim_map and partial_status
  • fix distMetaTensor.initialzed() to support calling spmd from static graph
  • make parameter in startup program as distTensor, to be consistent with main program
  • make master weight as distTensor if needed

Pcard-76459

Copy link

paddle-bot bot commented Jun 12, 2024

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

@zhiqiu zhiqiu changed the title refine pir dist to_static refine pir dist to_static to support master weight Jun 12, 2024
@zhiqiu zhiqiu force-pushed the dev/fix_startup_prog branch from 0f88dff to 5cc030f Compare June 13, 2024 04:02
@zhiqiu zhiqiu force-pushed the dev/fix_startup_prog branch from f7abc73 to 7cb803d Compare June 18, 2024 13:01
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 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
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾 for new API without type annotations

@@ -2867,4 +2867,37 @@ void BindEagerUtils(PyObject* module) {
}
}

std::tuple<std::vector<int64_t>,
paddle::flat_hash_map<int64_t, phi::ReduceType>>
CvtPlacements(Placements placements, int ndim) {
Copy link
Contributor

Choose a reason for hiding this comment

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

CvtToPlacements会不会更好点?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix it in the next pr.

Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM

@zhiqiu zhiqiu merged commit d95a4cb into PaddlePaddle:develop Jun 19, 2024
):
is_dist = True

def to_dist(value):
Copy link
Contributor

Choose a reason for hiding this comment

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

这个名字感觉会有点歧义,感觉有两种理解:
to_dist_from_global()
to_dist_from_local()

是否需要加以区分?

co63oc pushed a commit to co63oc/Paddle that referenced this pull request Jun 25, 2024
* refine pir dist to_static

* fix bug

* fix partial
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.

5 participants