Skip to content

Commit 53cb513

Browse files
committed
improve variable naming
Signed-off-by: Hao Wu <skyw@nvidia.com>
1 parent e302bf7 commit 53cb513

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

emerging_optimizers/soap/soap.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,17 @@ def step(self, closure: Callable[[], float] | None = None) -> float | None:
273273
torch.cuda.nvtx.range_push("precondition")
274274
if state["step"] >= self.adam_warmup_steps:
275275
with utils.fp32_matmul_precision(self.fp32_matmul_prec):
276-
norm_precond_update = precondition(
276+
precond_update = precondition(
277277
grad=adam_update,
278278
eigenbasis_list=state.get("Q", None),
279279
dims=[[0], [1]],
280280
)
281281
else:
282-
norm_precond_update = adam_update
282+
precond_update = adam_update
283283
torch.cuda.nvtx.range_pop()
284284

285-
_clip_update_rms_in_place(norm_precond_update, self.max_update_rms)
286-
p.add_(norm_precond_update, alpha=-group["lr"])
285+
_clip_update_rms_in_place(precond_update, self.max_update_rms)
286+
p.add_(precond_update, alpha=-group["lr"])
287287

288288
state["step"] += 1
289289

0 commit comments

Comments
 (0)