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] Support pipeline parallelism backward non-computation clip. #58609

Merged

Conversation

GhostScreaming
Copy link
Contributor

@GhostScreaming GhostScreaming commented Nov 2, 2023

PR types

Bug fixes

PR changes

Others

Description

Pcard-73145

修复 PR 58449PR 58506 的编译冲突。

支持流水线并行反向的非计算rank计算裁剪。前向PR参考PR 58126paddle::distributed::reshard构建前反向的PR参考PR 58238。重点对创建反向图时,对unintialized的Tensor行为进行了特殊处理。

  1. 对于IsRunAutoParallel()的情况,跳过FillZeroForEmptyGradInput处理。
  2. SetGradInMeta特殊处理PP的情况
  3. GradTensorHolder::add特殊处理PP的情况,防止反向节点之间的边未连接。

Verified

This commit was signed with the committer’s verified signature.
suemto suem
… support_reshard_backward
strategy and dp-mp-pp hybrid strategy are verified. As CI machine
only has 2 cards and dp-mp-pp strategy needs 9 GPU cards, such case
will be added in testcase later.
@GhostScreaming GhostScreaming merged commit 3b44f88 into PaddlePaddle:develop Nov 2, 2023
zeroRains pushed a commit to zeroRains/Paddle that referenced this pull request Nov 8, 2023
…clip. (PaddlePaddle#58609)

* [AutoParallel] Support paddle.distributed.reshard construct GradNode,
which is needed for pipeline parallel.

* Fix problem of CI, and fix pp testcase as review comments advising.

* Fix including files problem.

* Polish paddle.distributed.reshard implementation according to review comments.

* Fix some problems.

* Polish code.

* Fix problem of failed testcase.

* Move reshard function to tensor_utils.h, as files in phi/core is
not allowed to include files in phi/api.

* Add forgetting file.

* Fix some compilation problem.

* Remove useless PADDLE_WITH_DISTRIBUTE conditional compilation.

* Remove useless PADDLE_WITH_DISTRIBUTE conditional compilation.

* Fix problem of WITH_PYTHON=OFF compilation option.

* Fix bug of conditional compilation.

* [AutoParallel] Support pipeline parallel backward. Both pp single
strategy and dp-mp-pp hybrid strategy are verified. As CI machine
only has 2 cards and dp-mp-pp strategy needs 9 GPU cards, such case
will be added in testcase later.

* Polish pipeline parallel backward implementation.

* Remove useless modification.

* Add MLP dp-mp-pp hybrid strategy testcase, it can't be run on
CI Machine now as it needs 8 gpus.

* Remove useless modification.

* Fix problem of Tensor double free and polish code.

* Fix problem of ReshardOutputPartialAxisToReplicated.

* Revert "Revert "[AutoParallel] Support pipeline parallelism backward non-computation clip. (PaddlePaddle#58449)" (PaddlePaddle#58601)"

This reverts commit 79e24ec.
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…clip. (PaddlePaddle#58609)

* [AutoParallel] Support paddle.distributed.reshard construct GradNode,
which is needed for pipeline parallel.

* Fix problem of CI, and fix pp testcase as review comments advising.

* Fix including files problem.

* Polish paddle.distributed.reshard implementation according to review comments.

* Fix some problems.

* Polish code.

* Fix problem of failed testcase.

* Move reshard function to tensor_utils.h, as files in phi/core is
not allowed to include files in phi/api.

* Add forgetting file.

* Fix some compilation problem.

* Remove useless PADDLE_WITH_DISTRIBUTE conditional compilation.

* Remove useless PADDLE_WITH_DISTRIBUTE conditional compilation.

* Fix problem of WITH_PYTHON=OFF compilation option.

* Fix bug of conditional compilation.

* [AutoParallel] Support pipeline parallel backward. Both pp single
strategy and dp-mp-pp hybrid strategy are verified. As CI machine
only has 2 cards and dp-mp-pp strategy needs 9 GPU cards, such case
will be added in testcase later.

* Polish pipeline parallel backward implementation.

* Remove useless modification.

* Add MLP dp-mp-pp hybrid strategy testcase, it can't be run on
CI Machine now as it needs 8 gpus.

* Remove useless modification.

* Fix problem of Tensor double free and polish code.

* Fix problem of ReshardOutputPartialAxisToReplicated.

* Revert "Revert "[AutoParallel] Support pipeline parallelism backward non-computation clip. (PaddlePaddle#58449)" (PaddlePaddle#58601)"

This reverts commit 79e24ec.
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.

None yet

2 participants