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

refactor mp. #45803

Merged
merged 12 commits into from
Sep 16, 2022
Merged

refactor mp. #45803

merged 12 commits into from
Sep 16, 2022

Conversation

wuhuachaocoding
Copy link
Contributor

@wuhuachaocoding wuhuachaocoding commented Sep 6, 2022

PR types

Others

PR changes

Others

Describe

refactor mp:
this PR mainly changes some dir of mp functions and classes.

  • move some private functions about mp to 'fleet/layers/mpu' from collective.py(to simplify it).

  • when using functions for mp operations, we recommend to call it as 'fleet.layers.mpu.xxx'.

users are not aware of it, Compatible with the upgrade.

@paddle-bot
Copy link

paddle-bot bot commented Sep 6, 2022

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

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

Some comments.

python/paddle/distributed/fleet/layers/mpu/__init__.py Outdated Show resolved Hide resolved
gongweibao
gongweibao previously approved these changes Sep 14, 2022
Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

LGTM

from ...base import topology as tp
from paddle.autograd import PyLayer

__all__ = []
Copy link
Contributor

Choose a reason for hiding this comment

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

useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when using functions for mp operations, we recommend to call it as 'fleet.layers.mpu.xxx'.

XiaoguangHu01
XiaoguangHu01 previously approved these changes Sep 15, 2022
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
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

@ForFishes ForFishes merged commit fa97e5b into PaddlePaddle:develop Sep 16, 2022
wuhuachaocoding added a commit to wuhuachaocoding/Paddle that referenced this pull request Sep 16, 2022
* refactor mp.

* update setup.py.

* update mp_layers.py for compatibility.

* add documents for mp_layers.py

* update init.py

* update collective.py.

* update.

* update mp_ops.py

* update.

* update code style.

* update code style.
fuyinno4 pushed a commit that referenced this pull request Sep 19, 2022
* refactor mp.

* update setup.py.

* update mp_layers.py for compatibility.

* add documents for mp_layers.py

* update init.py

* update collective.py.

* update.

* update mp_ops.py

* update.

* update code style.

* update code style.
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