Closed
Conversation
|
|
||
| def _get_group_local_rank(group: torch.distributed.ProcessGroup | None = None) -> int: | ||
| """Rank of the current process within `group`.""" | ||
| if group is None: |
Collaborator
There was a problem hiding this comment.
isn't it
cp_rank = device_mesh.get_local_rank("cp")
| """ | ||
| self.dataloader = dataloader | ||
| self.cp_rank = cp_rank | ||
| self.cp_rank = _get_group_local_rank(cp_group) if cp_rank is None else cp_rank |
Collaborator
There was a problem hiding this comment.
should just be cp_rank = device_mesh.get_local_rank("cp")
aa43e98 to
dd04039
Compare
Signed-off-by: Peter St. John <pstjohn@nvidia.com> pass device mesh rather than process_group to cp dataset Signed-off-by: Peter St. John <pstjohn@nvidia.com> fix train_ddp_cp Signed-off-by: Peter St. John <pstjohn@nvidia.com> add test for cp_dataloader that doesn't require datacenter hardware Signed-off-by: Peter St. John <pstjohn@nvidia.com> remove logger level with hydra Signed-off-by: Peter St. John <pstjohn@nvidia.com> fix cp test api Signed-off-by: Peter St. John <pstjohn@nvidia.com> bump fp8 test tolerance Signed-off-by: Peter St. John <pstjohn@nvidia.com>
ea2fae7 to
d10fb25
Compare
Collaborator
Author
|
squashed this into #1382 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
create_cp_dataloaderessentially just wrapcreate_thd_dataloader, modifying the collator and wrapping the dataloader in-place