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

each PipelineStage holds multiple submods #855

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

moonbucks
Copy link
Contributor

Description

if inner_depth > 1, each PipelineStage holds multiple submods

Fixes #(issue)

  • [v] New feature (non-breaking change which adds functionality)

Feature/Issue validation/testing

No error occurs when internal depth == 1 (default case)

Checklist:

  • [v] Has code been commented, particularly in hard-to-understand areas?

self.name, self.submod = named_children[rank]
self.name, self.submod = named_children[
rank * self.inner_depth
] # submod = first inner node of each rank
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we move the comment to L91?

@@ -96,6 +113,14 @@ def __init__(
if not found_node:
raise AssertionError(f"Cannot find {self.name} in graph")

if self.inner_depth > 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe adding some comments?

@@ -112,10 +137,27 @@ def __init__(
f"Cannot find backward for {self.name} in graph"
)

if self.inner_depth > 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@moonbucks moonbucks merged commit de6ba61 into pytorch:pp_tp_optimization Aug 8, 2023
4 of 24 checks passed
@moonbucks moonbucks deleted the ip1 branch August 8, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants