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
89fa152b
Unverified
Commit
89fa152b
authored
Sep 28, 2018
by
mcarilli
Committed by
GitHub
Sep 28, 2018
Browse files
Move other logic after forward to take advantage of GPU skew
parent
9d731777
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 @
89fa152b
...
@@ -324,6 +324,8 @@ class DistributedDataParallel(Module):
...
@@ -324,6 +324,8 @@ class DistributedDataParallel(Module):
def
forward
(
self
,
*
inputs
,
**
kwargs
):
def
forward
(
self
,
*
inputs
,
**
kwargs
):
result
=
self
.
module
(
*
inputs
,
**
kwargs
)
if
not
self
.
delay_allreduce
:
if
not
self
.
delay_allreduce
:
param_list
=
[
param
for
param
in
self
.
module
.
parameters
()
if
param
.
requires_grad
]
param_list
=
[
param
for
param
in
self
.
module
.
parameters
()
if
param
.
requires_grad
]
...
@@ -354,4 +356,4 @@ class DistributedDataParallel(Module):
...
@@ -354,4 +356,4 @@ class DistributedDataParallel(Module):
self
.
callback_queued
=
False
self
.
callback_queued
=
False
return
self
.
module
(
*
inputs
,
**
kwargs
)
return
result
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