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
6e39bee3
Commit
6e39bee3
authored
Jun 22, 2018
by
Michael Carilli
Browse files
Merge branch 'master' of
https://github.com/NVIDIA/apex
parents
bfa3e0ee
251cddaf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
apex/amp/wrap.py
apex/amp/wrap.py
+4
-4
csrc/scale_cuda.cu
csrc/scale_cuda.cu
+1
-1
csrc/weight_norm_bwd_cuda.cu
csrc/weight_norm_bwd_cuda.cu
+1
-1
csrc/weight_norm_fwd_cuda.cu
csrc/weight_norm_fwd_cuda.cu
+1
-1
setup.py
setup.py
+1
-0
No files found.
apex/amp/wrap.py
View file @
6e39bee3
...
@@ -191,11 +191,11 @@ def rnn_cast(backend, fn, verbose=False):
...
@@ -191,11 +191,11 @@ def rnn_cast(backend, fn, verbose=False):
# 2) Inputs: either a tuple (for LSTM) or single tensor
# 2) Inputs: either a tuple (for LSTM) or single tensor
if
isinstance
(
hiddens
,
tuple
):
if
isinstance
(
hiddens
,
tuple
):
new_args
.
append
(
tuple
(
cast_fn
(
x
)
for
x
in
hiddens
))
new_args
.
append
(
tuple
(
cast_fn
(
x
)
for
x
in
hiddens
))
elif
utils
.
is_fp_tensor
(
hidden
):
elif
utils
.
is_fp_tensor
(
hidden
s
):
new_args
.
append
(
cast_fn
(
hidden
))
new_args
.
append
(
cast_fn
(
hidden
s
))
else
:
else
:
# Hidden can, in principle, be `None` -- pass through
# Hidden
s
can, in principle, be `None` -- pass through
new_args
.
append
(
hidden
)
new_args
.
append
(
hidden
s
)
# 3) Batch sizes (0.4 or later only)
# 3) Batch sizes (0.4 or later only)
if
len
(
fargs
)
==
4
:
if
len
(
fargs
)
==
4
:
...
...
csrc/scale_cuda.cu
View file @
6e39bee3
#include <ATen/ATen.h>
#include <ATen/ATen.h>
// #include "ATen/AccumulateType.h"
// #include "ATen/AccumulateType.h"
#include "ATen/cuda/CUDATensorMethods.cuh"
#include "ATen/cuda/CUDATensorMethods.cuh"
#include "ATen/cuda/CUDATypeConversion.cuh"
//
#include "ATen/cuda/CUDATypeConversion.cuh"
// #include <THC/THCTensorMathReduce.cuh>
// #include <THC/THCTensorMathReduce.cuh>
#include <THC/THCGeneral.h>
#include <THC/THCGeneral.h>
...
...
csrc/weight_norm_bwd_cuda.cu
View file @
6e39bee3
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#endif
#endif
#include "ATen/cuda/CUDATensorMethods.cuh"
#include "ATen/cuda/CUDATensorMethods.cuh"
#include "ATen/cuda/CUDATypeConversion.cuh"
//
#include "ATen/cuda/CUDATypeConversion.cuh"
// #include <THC/THCTensorMathReduce.cuh>
// #include <THC/THCTensorMathReduce.cuh>
template
template
...
...
csrc/weight_norm_fwd_cuda.cu
View file @
6e39bee3
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#endif
#endif
#include "ATen/cuda/CUDATensorMethods.cuh"
#include "ATen/cuda/CUDATensorMethods.cuh"
#include "ATen/cuda/CUDATypeConversion.cuh"
//
#include "ATen/cuda/CUDATypeConversion.cuh"
// #include <THC/THCTensorMathReduce.cuh>
// #include <THC/THCTensorMathReduce.cuh>
template
template
...
...
setup.py
View file @
6e39bee3
import
torch.cuda
import
torch.cuda
import
ctypes
import
os
import
os
import
re
import
re
import
subprocess
import
subprocess
...
...
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