-
Notifications
You must be signed in to change notification settings - Fork 242
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
Disable integration test between optimizer-in-backward and pp #793
base: main
Are you sure you want to change the base?
Conversation
…est with dp, tp, hsdp, cp
@@ -81,30 +81,37 @@ def __init__( | |||
) -> None: | |||
self.optimizers = [] | |||
self.model_parts = model_parts | |||
optim_dict = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collect all optims in optim_dict, avoid bugs with only valid hooks at the last self.model_parts if len(self.model_parts)>1 (for future support of multi schedule pp)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix for optim dict lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@@ -127,6 +134,10 @@ def build_optimizers( | |||
step() and zero_grad() method for all the child optimizers. | |||
""" | |||
optim_in_bwd = job_config.optimizer.early_step_in_backward | |||
if optim_in_bwd and job_config.experimental.pipeline_parallel_degree > 1: | |||
raise NotImplementedError( | |||
"Optimizers in backward is not supported with pipeline parallelism." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
Not yet supported
Optimizer-in-backward would free gradients memory during backward, causing integration test failure with pp at gradient scale
Disable test with pp first, would enable later with support to multi schedule pp
Add test with dp, tp, cp, hsdp