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
68c96f4c
Commit
68c96f4c
authored
Jun 26, 2018
by
Samuel
Browse files
Fixed deadlock issue
parent
3fa300b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
apex/parallel/distributed.py
apex/parallel/distributed.py
+2
-1
No files found.
apex/parallel/distributed.py
View file @
68c96f4c
...
@@ -3,11 +3,12 @@ from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
...
@@ -3,11 +3,12 @@ from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
import
torch.distributed
as
dist
import
torch.distributed
as
dist
from
torch.nn.modules
import
Module
from
torch.nn.modules
import
Module
from
torch.autograd
import
Variable
from
torch.autograd
import
Variable
from
collections
import
OrderedDict
def
flat_dist_call
(
tensors
,
call
,
extra_args
=
None
):
def
flat_dist_call
(
tensors
,
call
,
extra_args
=
None
):
flat_dist_call
.
warn_on_half
=
True
flat_dist_call
.
warn_on_half
=
True
buckets
=
{}
buckets
=
OrderedDict
()
for
tensor
in
tensors
:
for
tensor
in
tensors
:
tp
=
tensor
.
type
()
tp
=
tensor
.
type
()
if
tp
not
in
buckets
:
if
tp
not
in
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