Skip to content

Commit c803152

Browse files
committed
formatting
1 parent 7bb1a61 commit c803152

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deepspeed/runtime/zero/stage_1_and_2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,8 @@ def get_grad_norm_direct(self, gradients, params, norm_type=2):
16911691
continue
16921692
if is_model_parallel_parameter(p) or (self.model_parallel_rank == 0):
16931693
all_norms.append(
1694-
torch.linalg.norm(g.data.double().detach(), ord=norm_type).to(get_accelerator().current_device_name()))
1694+
torch.linalg.norm(g.data.double().detach(),
1695+
ord=norm_type).to(get_accelerator().current_device_name()))
16951696
if len(all_norms) > 0:
16961697
total_norm = torch.stack(all_norms).square().sum().float()
16971698
else:

0 commit comments

Comments
 (0)