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
ad98cc5f
Commit
ad98cc5f
authored
Sep 11, 2019
by
jjsjann123
Committed by
mcarilli
Sep 11, 2019
Browse files
removing nvtx range used for debugging (#485)
parent
325f5a0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
apex/parallel/optimized_sync_batchnorm_kernel.py
apex/parallel/optimized_sync_batchnorm_kernel.py
+0
-4
No files found.
apex/parallel/optimized_sync_batchnorm_kernel.py
View file @
ad98cc5f
...
...
@@ -8,7 +8,6 @@ class SyncBatchnormFunction(Function):
@
staticmethod
def
forward
(
ctx
,
input
,
z
,
weight
,
bias
,
running_mean
,
running_variance
,
eps
,
track_running_stats
=
True
,
momentum
=
1.0
,
process_group
=
None
,
channel_last
=
False
,
fuse_relu
=
False
):
torch
.
cuda
.
nvtx
.
range_push
(
"sync_BN_fw"
)
input
=
input
.
contiguous
()
world_size
=
0
...
...
@@ -64,13 +63,11 @@ class SyncBatchnormFunction(Function):
else
:
out
=
syncbn
.
batchnorm_forward
(
input
,
mean
,
inv_std
,
weight
,
bias
)
torch
.
cuda
.
nvtx
.
range_pop
()
return
out
@
staticmethod
def
backward
(
ctx
,
grad_output
):
grad_output
=
grad_output
.
contiguous
()
torch
.
cuda
.
nvtx
.
range_push
(
"sync_BN_bw"
)
# mini batch mean & var are calculated by forward path.
# mu = 1./N*np.sum(h, axis = 0)
# var = 1./N*np.sum((h-mu)**2, axis = 0)
...
...
@@ -113,5 +110,4 @@ class SyncBatchnormFunction(Function):
if
weight
is
None
or
not
ctx
.
needs_input_grad
[
3
]:
grad_bias
=
None
torch
.
cuda
.
nvtx
.
range_pop
()
return
grad_input
,
grad_z
,
grad_weight
,
grad_bias
,
None
,
None
,
None
,
None
,
None
,
None
,
None
,
None
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