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
deepspeed
Commits
7cab55c7
Unverified
Commit
7cab55c7
authored
Feb 16, 2021
by
Cheng Li
Committed by
GitHub
Feb 16, 2021
Browse files
Checks for None tensors and skip them when splitting the buckets in zero stage 2. (#728)
* check none tensors when splitting buckets
parent
ec8b1cb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
deepspeed/runtime/zero/stage2.py
deepspeed/runtime/zero/stage2.py
+1
-1
No files found.
deepspeed/runtime/zero/stage2.py
View file @
7cab55c7
...
@@ -37,7 +37,7 @@ def split_half_float_double(tensors):
...
@@ -37,7 +37,7 @@ def split_half_float_double(tensors):
]
]
buckets
=
[]
buckets
=
[]
for
i
,
dtype
in
enumerate
(
dtypes
):
for
i
,
dtype
in
enumerate
(
dtypes
):
bucket
=
[
t
for
t
in
tensors
if
t
.
type
()
==
dtype
]
bucket
=
[
t
for
t
in
tensors
if
t
is
not
None
and
t
.
type
()
==
dtype
]
if
bucket
:
if
bucket
:
buckets
.
append
(
bucket
)
buckets
.
append
(
bucket
)
return
buckets
return
buckets
...
...
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