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
wuxk1
Megatron-LM
Commits
7f1c5917
Commit
7f1c5917
authored
Jan 13, 2022
by
Lawrence McAfee
Browse files
handle output_tensor == None
parent
8fc5e323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
megatron/schedules.py
megatron/schedules.py
+2
-0
No files found.
megatron/schedules.py
View file @
7f1c5917
...
...
@@ -49,6 +49,8 @@ def deallocate_output_tensor(out):
sent to the next pipeline stage. At this point, the output tensor is
only useful for its '.grad_fn' field, and not its '.data'.
'''
if
out
is
None
:
return
assert
isinstance
(
out
,
torch
.
Tensor
),
\
"expected Tensor, found %s."
%
type
(
out
).
__name__
assert
out
.
_base
is
None
,
\
...
...
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