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
gaoqiong
composable_kernel
Commits
4522f7f8
Commit
4522f7f8
authored
Dec 23, 2022
by
rocking
Browse files
Prevent implicit cast
parent
18e65656
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
library/include/ck/library/reference_tensor_operation/cpu/reference_layernorm.hpp
...ry/reference_tensor_operation/cpu/reference_layernorm.hpp
+3
-1
No files found.
library/include/ck/library/reference_tensor_operation/cpu/reference_layernorm.hpp
View file @
4522f7f8
...
@@ -90,7 +90,9 @@ struct ReferenceLayernorm : public device::BaseOperator
...
@@ -90,7 +90,9 @@ struct ReferenceLayernorm : public device::BaseOperator
for
(
int
m
=
0
;
m
<
M
;
++
m
)
for
(
int
m
=
0
;
m
<
M
;
++
m
)
{
{
auto
divisor
=
1
/
sqrt
(
var
(
m
)
+
arg
.
epsilon_
);
AccDataType
divisor
=
static_cast
<
AccDataType
>
(
1
/
ck
::
math
::
sqrt
(
var
(
m
)
+
arg
.
epsilon_
));
for
(
int
n
=
0
;
n
<
N
;
++
n
)
for
(
int
n
=
0
;
n
<
N
;
++
n
)
{
{
auto
x_val
=
ck
::
type_convert
<
AccDataType
>
(
arg
.
x_m_n_
(
m
,
n
));
auto
x_val
=
ck
::
type_convert
<
AccDataType
>
(
arg
.
x_m_n_
(
m
,
n
));
...
...
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