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
apex
Commits
604d423b
Commit
604d423b
authored
Mar 20, 2020
by
Thor Johnsen
Browse files
Broadcast parameters from rank 0 just to be safe
parent
bc98827b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
apex/contrib/optimizers/distributed_fused_adam.py
apex/contrib/optimizers/distributed_fused_adam.py
+1
-0
No files found.
apex/contrib/optimizers/distributed_fused_adam.py
View file @
604d423b
...
@@ -89,6 +89,7 @@ class DistributedFusedAdam(torch.optim.Optimizer):
...
@@ -89,6 +89,7 @@ class DistributedFusedAdam(torch.optim.Optimizer):
self
.
_grads_info
=
[]
self
.
_grads_info
=
[]
for
group
in
self
.
param_groups
:
for
group
in
self
.
param_groups
:
for
p
in
group
[
'params'
]:
for
p
in
group
[
'params'
]:
torch
.
distributed
.
broadcast
(
p
,
0
)
if
not
p
.
requires_grad
:
if
not
p
.
requires_grad
:
continue
continue
p_grads_size
=
p
.
numel
()
p_grads_size
=
p
.
numel
()
...
...
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