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
2a467090
Commit
2a467090
authored
Feb 22, 2019
by
Syed Tousif Ahmed
Browse files
Rename IntList to IntArrayRef
parent
823b30cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
csrc/layer_norm_cuda.cpp
csrc/layer_norm_cuda.cpp
+10
-10
csrc/layer_norm_cuda_kernel.cu
csrc/layer_norm_cuda_kernel.cu
+2
-2
No files found.
csrc/layer_norm_cuda.cpp
View file @
2a467090
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
namespace
{
namespace
{
void
compute_n1_n2
(
void
compute_n1_n2
(
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
int
&
n1
,
int
&
n1
,
int
&
n2
)
int
&
n2
)
{
{
...
@@ -22,7 +22,7 @@ void compute_n1_n2(
...
@@ -22,7 +22,7 @@ void compute_n1_n2(
}
}
void
check_args
(
void
check_args
(
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
gamma
,
at
::
Tensor
gamma
,
at
::
Tensor
beta
at
::
Tensor
beta
)
)
...
@@ -33,7 +33,7 @@ void check_args(
...
@@ -33,7 +33,7 @@ void check_args(
void
check_args
(
void
check_args
(
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
int
&
n1
,
int
&
n1
,
int
&
n2
int
&
n2
)
)
...
@@ -69,7 +69,7 @@ void check_args(
...
@@ -69,7 +69,7 @@ void check_args(
void
check_args
(
void
check_args
(
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
gamma
,
at
::
Tensor
gamma
,
at
::
Tensor
beta
,
at
::
Tensor
beta
,
int
&
n1
,
int
&
n1
,
...
@@ -88,7 +88,7 @@ void cuda_layer_norm(
...
@@ -88,7 +88,7 @@ void cuda_layer_norm(
at
::
Tensor
*
input
,
at
::
Tensor
*
input
,
int
n1
,
int
n1
,
int
n2
,
int
n2
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
beta
,
at
::
Tensor
*
beta
,
double
epsilon
);
double
epsilon
);
...
@@ -99,7 +99,7 @@ void cuda_layer_norm(
...
@@ -99,7 +99,7 @@ void cuda_layer_norm(
std
::
vector
<
at
::
Tensor
>
layer_norm
(
std
::
vector
<
at
::
Tensor
>
layer_norm
(
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
double
epsilon
)
{
double
epsilon
)
{
CHECK_INPUT
(
input
);
CHECK_INPUT
(
input
);
int
n1
,
n2
;
int
n1
,
n2
;
...
@@ -113,7 +113,7 @@ std::vector<at::Tensor> layer_norm(
...
@@ -113,7 +113,7 @@ std::vector<at::Tensor> layer_norm(
}
}
std
::
vector
<
at
::
Tensor
>
layer_norm_affine
(
std
::
vector
<
at
::
Tensor
>
layer_norm_affine
(
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
gamma
,
at
::
Tensor
gamma
,
at
::
Tensor
beta
,
at
::
Tensor
beta
,
double
epsilon
)
{
double
epsilon
)
{
...
@@ -137,7 +137,7 @@ void cuda_layer_norm_gradient(
...
@@ -137,7 +137,7 @@ void cuda_layer_norm_gradient(
at
::
Tensor
*
input
,
at
::
Tensor
*
input
,
int
n1
,
int
n1
,
int
n2
,
int
n2
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
beta
,
at
::
Tensor
*
beta
,
double
epsilon
,
double
epsilon
,
...
@@ -151,7 +151,7 @@ at::Tensor layer_norm_gradient(
...
@@ -151,7 +151,7 @@ at::Tensor layer_norm_gradient(
at
::
Tensor
mean
,
at
::
Tensor
mean
,
at
::
Tensor
invvar
,
at
::
Tensor
invvar
,
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
double
epsilon
)
{
double
epsilon
)
{
CHECK_INPUT
(
dout
);
CHECK_INPUT
(
dout
);
CHECK_INPUT
(
mean
);
CHECK_INPUT
(
mean
);
...
@@ -170,7 +170,7 @@ std::vector<at::Tensor> layer_norm_gradient_affine(
...
@@ -170,7 +170,7 @@ std::vector<at::Tensor> layer_norm_gradient_affine(
at
::
Tensor
mean
,
at
::
Tensor
mean
,
at
::
Tensor
invvar
,
at
::
Tensor
invvar
,
at
::
Tensor
input
,
at
::
Tensor
input
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
gamma
,
at
::
Tensor
gamma
,
at
::
Tensor
beta
,
at
::
Tensor
beta
,
double
epsilon
)
{
double
epsilon
)
{
...
...
csrc/layer_norm_cuda_kernel.cu
View file @
2a467090
...
@@ -672,7 +672,7 @@ void cuda_layer_norm(
...
@@ -672,7 +672,7 @@ void cuda_layer_norm(
at
::
Tensor
*
input
,
at
::
Tensor
*
input
,
int
n1
,
int
n1
,
int
n2
,
int
n2
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
beta
,
at
::
Tensor
*
beta
,
double
epsilon
)
double
epsilon
)
...
@@ -767,7 +767,7 @@ void cuda_layer_norm_gradient(
...
@@ -767,7 +767,7 @@ void cuda_layer_norm_gradient(
at
::
Tensor
*
input
,
at
::
Tensor
*
input
,
int
n1
,
int
n1
,
int
n2
,
int
n2
,
at
::
Int
List
normalized_shape
,
at
::
Int
ArrayRef
normalized_shape
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
gamma
,
at
::
Tensor
*
beta
,
at
::
Tensor
*
beta
,
double
epsilon
,
double
epsilon
,
...
...
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