Skip to content

Commit

Permalink
[NFC] polish colossalai/context/process_group_initializer/initializer…
Browse files Browse the repository at this point in the history
…_sequence.py colossalai/context/process_group_initializer initializer_tensor.py code style (hpcaitech#639)

Co-authored-by: 何晓昕 <cautious@r-236-100-25-172.comp.nus.edu.sg>
  • Loading branch information
2 people authored and binmakeswell committed Apr 6, 2022
1 parent c7c224e commit 055d027
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class Initializer_Sequence(ProcessGroupInitializer):
pipeline_parallel_size (int): Size of pipeline parallel.
tensor_parallel_size (int): Size of tensor parallel.
"""
def __init__(self,
*args, **kwargs):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# reuse tensor parallel initializer code
self._sequence_initializer = Initializer_Tensor(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Initializer_Tensor(ProcessGroupInitializer):
pipeline_parallel_size (int): Size of pipeline parallel.
tensor_parallel_size (int): Size of tensor parallel.
"""

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.num_tensor_parallel_group = self.world_size // self.tensor_parallel_size
Expand Down

0 comments on commit 055d027

Please sign in to comment.