-
Notifications
You must be signed in to change notification settings - Fork 270
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 PP tracer + DP test #379
base: gh/kwen2501/4/base
Are you sure you want to change the base?
Conversation
[ghstack-poisoned]
ghstack-source-id: e26b222d093e1405277e45f42d93f05e58286980 Pull Request resolved: #379
CI should pass after pytorch/pytorch#127607 is landed. |
# Q1: what is the contract of `fully_shard`? Would it transform | ||
# module in place? @awgu indicates that it would. Then, we shouldn't | ||
# need to register the module with its parent again. |
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.
agreed
# Q2: does this requirement come from Activation Checkpointing, and | ||
# maybe this line too? | ||
# `transformer_block = torch.compile(transformer_block`) | ||
# If that's the case, should this line be moved above to after AC? |
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.
I think both of these lines included module wrappers, so AC and compile are the reasons why we have to reassign the module into the parent.
transformer_block = checkpoint_wrapper(transformer_block, ac_config)
transformer_block = torch.compile(transformer_block, dynamic=False)
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.
I think your point is good though. I think we have some unnecessary assignments back to the parent module here.
ghstack-source-id: e26b222d093e1405277e45f42d93f05e58286980 Pull Request resolved: #379
8de2449
to
8f6cf62
Compare
4f9bad3
to
490652c
Compare
ghstack-source-id: e26b222d093e1405277e45f42d93f05e58286980 Pull Request resolved: #379
Stack from ghstack (oldest at bottom):
Separate the addition of 2D test from original PR #362 for easier review and landing.
Also changed
.items()
tonamed_children()
for more general submodule access. See similar changes in #371.