Skip to content

Commit

Permalink
update condition&comments
Browse files Browse the repository at this point in the history
  • Loading branch information
inkcherry committed Dec 25, 2024
1 parent 931c121 commit 8d59565
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepspeed/runtime/zero/partition_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ def wait(self, handle_dependency=True) -> None:
param_offset += ds_tensor_numel

self.complete = True
if not handle_dependency:
if not get_accelerator().is_synchronized_device() and not handle_dependency:
# if the device needs to handle dependencies and opts for explicit processing outside the function.
AllGatherCoalescedHandle.data_buffer.append(partitions)

@staticmethod
Expand Down

0 comments on commit 8d59565

Please sign in to comment.