Skip to content
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions src/accelerate/utils/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ def _gpu_gather(tensor):
state = PartialState()
gather_op = torch.distributed.all_gather_into_tensor

# FIXME: the below 2 lines are added to work-aound a bug related to INT64 collectives in oneCCL. Remove them once pytorch-2.9 is released.
if state.device.type == "xpu":
torch.xpu.synchronize()

def _gpu_gather_one(tensor):
if tensor.ndim == 0:
tensor = tensor.clone()[None]
Expand Down