Skip to content

Commit

Permalink
Swap the order of the conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
inkcherry committed Dec 25, 2024
1 parent 8d59565 commit 59fef78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepspeed/runtime/zero/partition_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def wait(self, handle_dependency=True) -> None:
partitions.append(part_to_copy)
param.data = instrument_w_nvtx(torch.cat)(partitions).view(param.ds_shape)
param.ds_status = ZeroParamStatus.AVAILABLE
if handle_dependency and not get_accelerator().is_synchronized_device():
if not get_accelerator().is_synchronized_device() and handle_dependency:
for part_to_copy in partitions:
part_to_copy.record_stream(get_accelerator().current_stream())

Expand Down

0 comments on commit 59fef78

Please sign in to comment.