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
41c1af0e
Commit
41c1af0e
authored
Apr 20, 2020
by
Mohammad
Browse files
removed bcast in local ddp
parent
d805e1a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
megatron/model/distributed.py
megatron/model/distributed.py
+0
-4
No files found.
megatron/model/distributed.py
View file @
41c1af0e
...
@@ -31,10 +31,6 @@ class DistributedDataParallel(MegatronModule):
...
@@ -31,10 +31,6 @@ class DistributedDataParallel(MegatronModule):
self
.
module
=
module
self
.
module
=
module
self
.
data_parallel_group
=
mpu
.
get_data_parallel_group
()
self
.
data_parallel_group
=
mpu
.
get_data_parallel_group
()
src_rank
=
mpu
.
get_model_parallel_rank
()
for
p
in
self
.
module
.
parameters
():
if
torch
.
is_tensor
(
p
):
dist
.
broadcast
(
p
,
src_rank
,
group
=
self
.
data_parallel_group
)
def
allreduce_params
(
reduce_after
=
True
,
no_scale
=
False
,
fp32_allreduce
=
False
):
def
allreduce_params
(
reduce_after
=
True
,
no_scale
=
False
,
fp32_allreduce
=
False
):
if
(
self
.
needs_reduction
):
if
(
self
.
needs_reduction
):
...
...
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