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
866454e0
Commit
866454e0
authored
Apr 25, 2018
by
Christian Sarofeen
Browse files
Distributed fix for non-all reduce call.
parent
2fa4dbaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
apex/parallel/distributed.py
apex/parallel/distributed.py
+3
-1
No files found.
apex/parallel/distributed.py
View file @
866454e0
...
...
@@ -26,7 +26,9 @@ def flat_dist_call(tensors, call, extra_args=None):
call
(
coalesced
,
*
extra_args
)
else
:
call
(
coalesced
)
coalesced
/=
dist
.
get_world_size
()
if
call
is
dist
.
all_reduce
:
coalesced
/=
dist
.
get_world_size
()
for
buf
,
synced
in
zip
(
bucket
,
_unflatten_dense_tensors
(
coalesced
,
bucket
)):
buf
.
copy_
(
synced
)
...
...
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