Skip to content

Commit

Permalink
Fix indent for line 317 (shard.grad = grad_shard)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhataws committed Mar 19, 2024
1 parent ae348b2 commit 173ef47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch_xla/distributed/zero_redundancy_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ def step(self, closure=None, **kwargs):

if grad_shard.dtype != self.optimizer_dtype:
grad_shard = grad_shard.to(dtype=self.optimizer_dtype)
shard.grad = grad_shard
shard.grad = grad_shard

index += 1

if self.grad_clipping:
Expand Down

0 comments on commit 173ef47

Please sign in to comment.