Skip to content

Commit

Permalink
Update apex/transformer/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Masaki Kozuki <[email protected]>
  • Loading branch information
nWEIdia and crcrpar authored May 9, 2024
1 parent 64aea56 commit bfeb06a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apex/transformer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# The following 4 lines are for backward comparability with
# older PyTorch.
if "all_gather_into_tensor" not in dir(torch.distributed):
assert torch.distributed.is_available(), "PyTorch Distributed is Not available or Disabled."
if not torch.distributed.is_available():
raise RuntimeError("PyTorch Distributed is Not available or Disabled.")
torch.distributed.all_gather_into_tensor = torch.distributed._all_gather_base

def ensure_divisibility(numerator, denominator):
Expand Down

0 comments on commit bfeb06a

Please sign in to comment.