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

[dygraph hybrid pp for interleave] Virtual pp stage layer split #45402

Merged
merged 12 commits into from
Aug 26, 2022

Conversation

FeixLiu
Copy link
Contributor

@FeixLiu FeixLiu commented Aug 25, 2022

PR types

Others

PR changes

Others

Describe

Support virtual pp stage layer split.
This is one of the pre-work for interleave scheduler for pipeline.
Add a new param to pp_layer, num_virtual_pipeline_stages, which means virtual pipeline stage on each real pipeline stage.
As we known, for a model with 8 layers, if real pipeline stage is 2, layers [0, 1, 2, 3] will be assigned to the first pipeline stage and layers [4, 5, 6, 7] will be assigned to the second pipeline stage.
Take the same model with 8 layers as an example, if the real pipeline stage is 2 and the num_virtual_pipeline_stages is also set to 2, layers [0, 1] and layers [4, 5] will be assigned to the first pipeline stage, while layers [2, 3] and layers [6, 7] will be assigned to the second pipeline stage. Each real pipeline stage has two separate model chunks, which are called virtual pipeline stage.

All works for supporting interleave scheduler for pipeline:

  • Support virtual pipeline layer spit ([dygraph hybrid pp for interleave] Virtual pp stage layer split #45402)
  • Support virtual pipeline layer forward function (compatible with recompute)
  • Implement interleave scheduler in pipeline_parallel
  • Implement save/load function for pipeline_parallel with virtual stage
  • All necessary UT relating with recompute, AMP and etc.
  • Some other functions but not sure yet

@paddle-bot
Copy link

paddle-bot bot commented Aug 25, 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.

@FeixLiu FeixLiu changed the title [hybrid pp] Virtual pp stage layer split [dygraph hybrid pp for interleave] Virtual pp stage layer split Aug 25, 2022
@FeixLiu FeixLiu requested a review from sneaxiy August 25, 2022 09:24
Copy link
Contributor

@XieYunshen XieYunshen 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 set_tests_properties( test_parallel_dygraph_pipeline_parallel_with_virtual_stage PROPERTIES TIMEOUT 500)

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