Skip to content

Commit

Permalink
Remove unneeded dict reinit (fix for microsoft#4565) (microsoft#4702)
Browse files Browse the repository at this point in the history
  • Loading branch information
eisene authored Nov 17, 2023
1 parent 0ec2d3e commit a603a21
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions deepspeed/runtime/zero/stage3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1376,8 +1376,6 @@ def partition_grads(self, params_to_release: List[Parameter], grad_partitions: L
# offload the gradient partition if applicable
if self.offload_optimizer:
i, dest_offset, _ = self.grad_position[self.get_param_id(param)]
offload_fp32_gradients = {}
offload_fp32_offsets = {}

if self.is_gradient_accumulation_boundary:
self.norm_for_param_grads[self.get_param_id(param)] = self._constant_buffered_norm2(grad_buffer)
Expand Down

0 comments on commit a603a21

Please sign in to comment.