Skip to content

Commit

Permalink
fix trailing space issue (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarkstrum committed Jan 6, 2022
1 parent d3417ce commit 02a8913
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fairscale/nn/data_parallel/fully_sharded_data_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2366,8 +2366,8 @@ def _post_state_dict_hook(
prefix: str,
*args: Any,
) -> "OrderedDict[str, torch.Tensor]":
# When state_dict_on_rank_0_only is ``True``, ``model.state_dict()`` will only
# returns full state dict on rank 0 and return empty dict non-rank 0,
# When state_dict_on_rank_0_only is ``True``, ``model.state_dict()`` will only
# returns full state dict on rank 0 and return empty dict non-rank 0,
# which allow FullyShardedDataParallel to skip the GPU -> CPU copy on
# non-rank 0 altogether and prevent OOM.
if state_dict_on_rank_0_only and dist.get_rank() != 0:
Expand Down

0 comments on commit 02a8913

Please sign in to comment.