Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update apex/transformer/utils.py
Co-authored-by: Masaki Kozuki <[email protected]>
  • Loading branch information
nWEIdia and crcrpar authored May 9, 2024
commit bfeb06aa05835fdbd328d29aa5aa3f69b432e693
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