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

[IPU] Decoupling ipu sharding and modeling #43164

Merged
merged 4 commits into from
Jun 15, 2022

Conversation

gglin001
Copy link
Contributor

@gglin001 gglin001 commented Jun 2, 2022

PR types

Others

PR changes

APIs

Describe

文档对应的 PR PaddlePaddle/docs#4855
这个PR是 PR #42961 的重复, 因为 #42961 提示

很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读[飞桨原生算子开发规范](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/07_new_op/new_op_cn.html),你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。
Sorry to inform you that through our discussion, your PR fails to meet the merging standard (Reference: [Paddle Custom Operator Design Doc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/07_new_op/new_op_cn.html)). You can also submit an new one. Thank you.

* feat(shard): decoupling shard setting with modeling.

* fix(shard): split test cases to avoid failure.

* fix(shard): add function docs and fix typo.

* test(shard): add tests.

* test(shard): more test case.

* fix(): change ipu_index/stage default value to -1.
@paddle-bot-old paddle-bot-old bot added contributor External developers status: proposed labels Jun 2, 2022
@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 2, 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

@qili93 qili93 left a comment

Choose a reason for hiding this comment

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

LGTM

@gglin001
Copy link
Contributor Author

gglin001 commented Jun 9, 2022

补充信息:
这里的 CI PR-CI-iScan-Python 报错应当属于误报, 报错信息为:

Context manager 'generator' doesn't implement enter and exit.

对应代码为:

        def __call__(self, *args, **kwargs):
            with ipu_shard_guard(index=index, stage=stage):
                return super().__call__(*args, **kwargs)

ipu_shard_guard 对应的接口是

@signature_safe_contextmanager
def ipu_shard_guard(index=-1, stage=-1):
...

使用 @signature_safe_contextmanager 装饰会使得 ipu_shard_guard 具有 context manager 的性质

Copy link
Contributor

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

@qili93 qili93 merged commit 13cf4ce into PaddlePaddle:develop Jun 15, 2022
@gglin001 gglin001 deleted the ipu_commit/set_ipu_shard_cp branch June 15, 2022 10:55
sneaxiy pushed a commit to sneaxiy/Paddle that referenced this pull request Jun 27, 2022
* Decoupling ipu sharding and modeling (PaddlePaddle#665)

* feat(shard): decoupling shard setting with modeling.

* fix(shard): split test cases to avoid failure.

* fix(shard): add function docs and fix typo.

* test(shard): add tests.

* test(shard): more test case.

* fix(): change ipu_index/stage default value to -1.

* fix format

Co-authored-by: czr-gc <[email protected]>
@paddle-bot-old paddle-bot-old bot removed the contributor External developers label Oct 17, 2022
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