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

[AutoParallel] add create_mesh api #58659

Merged
merged 7 commits into from
Nov 10, 2023

Conversation

zhaoyinglia
Copy link
Contributor

@zhaoyinglia zhaoyinglia commented Nov 3, 2023

PR types

Others

PR changes

APIs

Description

  • add create_mesh and get_mesh api for auto_parallel

example:

auto.create_mesh([('dp', 2), ('pp', 4), ('mp', 4)])
new_mesh = auto.get_mesh().get_mesh_with_dim("pp")
new_mesh.mesh # new_mesh topo:
"""
[[[ 0  1  2  3]
  [16 17 18 19]]

 [[ 4  5  6  7]
  [20 21 22 23]]

 [[ 8  9 10 11]
  [24 25 26 27]]

 [[12 13 14 15]
  [28 29 30 31]]]
"""
new_mesh[0] # pp-0's mesh:
""" 
shape [2, 4], process_ids [0, 1, 2, 3, 16, 17, 18, 19], dim_nams ['dp', 'mp']
"""
new_mesh[0].mesh # pp-0's mesh topo
"""
[[ 0  1  2  3]
 [16 17 18 19]]
"""

Others

Pcard-76459

Copy link

paddle-bot bot commented Nov 3, 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

@zhiqiu zhiqiu 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

@sunzhongkai588 sunzhongkai588 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 docs

@zhaoyinglia zhaoyinglia merged commit 4575dac into PaddlePaddle:develop Nov 10, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* [AutoParallel] add create_mesh api

* fix completion and partitioner

* revert

* format

* add ut
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
* [AutoParallel] add create_mesh api

* fix completion and partitioner

* revert

* format

* add ut
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.

4 participants