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

Add distributed pass framework: including PassBase/PassTest/PassUtils #36643

Merged
merged 18 commits into from
Nov 15, 2021

Conversation

sneaxiy
Copy link
Collaborator

@sneaxiy sneaxiy commented Oct 22, 2021

PR types

New features

PR changes

Others

Describe

  • Add the distributed pass framework, including:
    • PassContext: a helper class to record the applied pass history.
    • PassBase: the super class of all distributed passes. The developers should override the _check_self, _check_conflict, _apply_impl/_apply_single_impl methods to implement their own passes.
    • ParallelOptPass, CalcOptPass and CommOptPass: three classes that are derived from PassBase. The developers should derive one of them instead of PassBase to implement their own passes.
    • CPPPassWrapper: a class that is derived from PassBase. It is used to wrap the existing C++ graph-based passes. Developers can call these passes using the same method as other Python passes.
    • PassManager: a helper class to do the automatic pass combination and solving conflicts.
    • Python pass example: FuseAllReducePass.
    • C++ graph-based example: FuseElementwiseAddActPass.
  • Add the distributed pass test framework DistPassTestBase.
  • Add split_program utils to show how to write the pass utility tools.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@sneaxiy sneaxiy changed the title Add split_program utils Add split_program pass utils Oct 26, 2021
@sneaxiy sneaxiy changed the title Add split_program pass utils [WIP] Add split_program pass utils Oct 29, 2021
@sneaxiy sneaxiy changed the title [WIP] Add split_program pass utils Add distributed pass demo Nov 2, 2021
@sneaxiy sneaxiy requested review from xymyeah and fuyinno4 November 3, 2021 07:32
@sneaxiy sneaxiy changed the title Add distributed pass demo Add distributed pass framework: including PassBase/PassTest/PassUtils Nov 3, 2021
@sneaxiy sneaxiy requested a review from chenwhql November 3, 2021 12:01
@JZ-LIANG JZ-LIANG self-requested a review November 10, 2021 08:46
@paddle-bot-old
Copy link

Sorry to inform you that ecf3f8e's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.



# Like AutoParallel/HybridParallel, etc.
class ParallelOptPass(PassBase):
Copy link
Contributor

Choose a reason for hiding this comment

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

From the current situation of the auto-parallel pass optimizations, we tend to directly inherit the PassBase and not use the ParallelOptPass, CalcOptPass and CommOptPass.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would fix it in the next PR.

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_split_program PROPERTIES TIMEOUT 120)

@sneaxiy sneaxiy merged commit 12339fa into PaddlePaddle:develop Nov 15, 2021
@sneaxiy sneaxiy deleted the add_split_program branch November 15, 2021 03:13
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.

6 participants