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

[Auto Parallel] Add the support for the auto completion of while_op #39939

Merged
merged 13 commits into from
Mar 16, 2022

Conversation

aoyulong
Copy link
Contributor

PR types

New features

PR changes

Others

Describe

  • This pr can automatically complete the distributed attributes for while_op and its sub_block.
  • The process_mesh completion algorithm is also improved to give users more flexibility to annotate the process_mesh.
  • Fix bugs in the compatible check of dist_default op.

@JZ-LIANG JZ-LIANG self-requested a review March 7, 2022 03:30
phlrain
phlrain previously approved these changes Mar 14, 2022
import numpy as np
import paddle.nn as nn
import paddle.utils as utils
import paddle.fluid as fluid
Copy link
Contributor

Choose a reason for hiding this comment

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

外部开发者不推荐使用fluid下的api,建议单测跟外部使用方式一致

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


input_array = fluid.layers.array_write(pred, i)
cond = fluid.layers.less_than(x=i, y=loop_len)
while_op = fluid.layers.While(cond=cond)
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

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

@aoyulong aoyulong merged commit ec6b8fb into PaddlePaddle:develop Mar 16, 2022
liqitong-a pushed a commit to liqitong-a/Paddle that referenced this pull request Mar 17, 2022
…addlePaddle#39939)

* [Auto Parallel] Support the auto completion of while_op

* [Auto Parallel] Improve the completion algorithms

* [Auto Parallel] Fix bugs for ernie inference

* [Auto Parallel] Remove attrs which cannot be pickled

* [Auto Parallel] make the dims_mappings of LodTensorArray vars empty

* [Auto Parallel] Fix bugs for the ernie inference in the pipeline parallel

* [Auto Parallel] Remove unncessary comments

* [Auto Parallel] Fix a bug of the CMakeLists

* [Auto Parallel] Use the newest APIs to write the unit test

* [Auto Parallel] Remove unnecessary statements
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.

3 participants