Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Megatron-LM
Commits
a5bfc013
Commit
a5bfc013
authored
Jul 13, 2020
by
Neel Kant
Browse files
Merge branch 'master' into ict-merge
parents
628bf0dd
c20f4d48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
megatron/mpu/random.py
megatron/mpu/random.py
+3
-1
No files found.
megatron/mpu/random.py
View file @
a5bfc013
...
...
@@ -234,7 +234,9 @@ class CheckpointFunction(torch.autograd.Function):
if
isinstance
(
outputs
,
torch
.
Tensor
):
outputs
=
(
outputs
,)
torch
.
autograd
.
backward
(
outputs
,
args
)
return
(
None
,)
+
tuple
(
inp
.
grad
for
inp
in
detached_inputs
)
grads
=
tuple
(
inp
.
grad
if
isinstance
(
inp
,
torch
.
Tensor
)
else
inp
for
inp
in
detached_inputs
)
return
(
None
,)
+
grads
def
checkpoint
(
function
,
*
args
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment