Skip to content

Commit

Permalink
Merge branch 'master' into akeshet/pdsh_rank_log
Browse files Browse the repository at this point in the history
  • Loading branch information
loadams authored Dec 16, 2024
2 parents ea251ff + db98cc3 commit 3dd25b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deepspeed/runtime/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3738,6 +3738,11 @@ def offload_states(self,
assert self.zero_optimization_stage(
) == ZeroStageEnum.weights, "Moving buffers across devices is supported only for ZeRO stage 3."

opt_offload_config = self.zero_offload_optimizer()
assert opt_offload_config is None or opt_offload_config.device == OffloadDeviceEnum.none, "Moving states across devices is not supported for offloaded optimizer states."
param_offload_config = self.zero_offload_param()
assert param_offload_config is None or param_offload_config.device == OffloadDeviceEnum.none, "Moving states across devices is not supported for offloaded parameters."

assert not self.zero_offload_param(), "Moving states across devices is not supported for offloaded parameters."

if device == OffloadDeviceEnum.none:
Expand Down

0 comments on commit 3dd25b5

Please sign in to comment.