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
6f28ea30
Unverified
Commit
6f28ea30
authored
Sep 28, 2020
by
Haibin Lin
Committed by
GitHub
Sep 28, 2020
Browse files
fix typos (#446)
parent
5412a334
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
deepspeed/runtime/pipe/p2p.py
deepspeed/runtime/pipe/p2p.py
+1
-1
deepspeed/runtime/zero/stage2.py
deepspeed/runtime/zero/stage2.py
+3
-3
No files found.
deepspeed/runtime/pipe/p2p.py
View file @
6f28ea30
...
@@ -14,7 +14,7 @@ def init_process_groups(grid):
...
@@ -14,7 +14,7 @@ def init_process_groups(grid):
global
_groups
,
_grid
global
_groups
,
_grid
_grid
=
grid
_grid
=
grid
assert
_grid
.
pipe_parallel_size
>
1
,
"There is no
model
parallelism"
assert
_grid
.
pipe_parallel_size
>
1
,
"There is no
pipeline
parallelism"
_groups
=
[
dist
.
new_group
(
ranks
=
group
)
for
group
in
_grid
.
p2p_groups
]
_groups
=
[
dist
.
new_group
(
ranks
=
group
)
for
group
in
_grid
.
p2p_groups
]
...
...
deepspeed/runtime/zero/stage2.py
View file @
6f28ea30
...
@@ -260,7 +260,7 @@ class FP16_DeepSpeedZeroOptimizer(object):
...
@@ -260,7 +260,7 @@ class FP16_DeepSpeedZeroOptimizer(object):
for
p
,
q
in
zip
(
self
.
fp16_groups
[
i
],
updated_params
):
for
p
,
q
in
zip
(
self
.
fp16_groups
[
i
],
updated_params
):
p
.
data
=
q
.
data
p
.
data
=
q
.
data
#divide the flat weights into near equal par
i
tition equal to the data parallel degree
#divide the flat weights into near equal partition equal to the data parallel degree
#each process will compute on a different part of the partition
#each process will compute on a different part of the partition
data_parallel_partitions
=
self
.
get_data_parallel_partitions
(
data_parallel_partitions
=
self
.
get_data_parallel_partitions
(
self
.
fp16_groups_flat
[
i
])
self
.
fp16_groups_flat
[
i
])
...
@@ -367,10 +367,10 @@ class FP16_DeepSpeedZeroOptimizer(object):
...
@@ -367,10 +367,10 @@ class FP16_DeepSpeedZeroOptimizer(object):
#stores the offset at which a parameter gradient needs to be inserted in a partition
#stores the offset at which a parameter gradient needs to be inserted in a partition
self
.
grad_partition_insertion_offset
=
{}
self
.
grad_partition_insertion_offset
=
{}
#the offset in the gradient at which it must be inserted at the beginning of the par
i
tition
#the offset in the gradient at which it must be inserted at the beginning of the partition
self
.
grad_start_offset
=
{}
self
.
grad_start_offset
=
{}
#will store the averaged gradients required by this pariti
t
on
#will store the averaged gradients required by this par
t
ition
self
.
averaged_gradients
=
{}
self
.
averaged_gradients
=
{}
# store index of first parameter in each partition
# store index of first parameter in each partition
...
...
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