Skip to content

Commit 4b41bb5

Browse files
committed
fix bug
1 parent 8951edb commit 4b41bb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internlm/solver/activation_checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def recompute_forward_context(args, no_communication):
6262

6363
if handle:
6464
handle.wait()
65-
args = list(args)
6665
args[0] = grad_output
6766

6867

@@ -157,6 +156,7 @@ def backward(ctx, *args):
157156

158157
detached_inputs = detach_variable(tuple(inputs))
159158

159+
args = list(args)
160160
with recompute_forward_context(args, no_communication):
161161
if ctx.had_autocast_in_fwd:
162162
with torch.enable_grad(), internlm_accelerator.amp.autocast():

0 commit comments

Comments
 (0)