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
e10df63e
Commit
e10df63e
authored
Sep 08, 2023
by
Jing Zhang
Browse files
fixed comments
parent
adc64a23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
example/42_groupnorm/groupnorm_sigmoid_mul_fp16.cpp
example/42_groupnorm/groupnorm_sigmoid_mul_fp16.cpp
+1
-1
include/ck/tensor_operation/gpu/element/unary_element_wise_operation.hpp
...or_operation/gpu/element/unary_element_wise_operation.hpp
+3
-2
No files found.
example/42_groupnorm/groupnorm_sigmoid_mul_fp16.cpp
View file @
e10df63e
...
@@ -25,7 +25,7 @@ struct YElementOp
...
@@ -25,7 +25,7 @@ struct YElementOp
ck
::
tensor_operation
::
element_wise
::
Sigmoid
{}(
a
,
x
);
ck
::
tensor_operation
::
element_wise
::
Sigmoid
{}(
a
,
x
);
y
=
x
*
a
;
y
=
type_convert
<
Y
>
(
x
*
a
)
;
};
};
};
};
...
...
include/ck/tensor_operation/gpu/element/unary_element_wise_operation.hpp
View file @
e10df63e
...
@@ -30,7 +30,7 @@ struct PassThrough
...
@@ -30,7 +30,7 @@ struct PassThrough
template
<
>
template
<
>
__host__
__device__
void
operator
()
<
float
,
double
>
(
float
&
y
,
const
double
&
x
)
const
__host__
__device__
void
operator
()
<
float
,
double
>
(
float
&
y
,
const
double
&
x
)
const
{
{
y
=
x
;
y
=
type_convert
<
float
>
(
x
)
;
}
}
template
<
>
template
<
>
...
@@ -431,7 +431,8 @@ struct Swish
...
@@ -431,7 +431,8 @@ struct Swish
is_same
<
X
,
ck
::
half_t
>::
value
,
is_same
<
X
,
ck
::
half_t
>::
value
,
"Data type is not supported by this operation!"
);
"Data type is not supported by this operation!"
);
y
=
x
/
(
ck
::
type_convert
<
Y
>
(
1
)
+
ck
::
math
::
exp
(
-
beta_
*
x
));
float
bx
=
-
beta_
*
type_convert
<
float
>
(
x
);
y
=
type_convert
<
Y
>
(
x
/
(
1.
f
+
ck
::
math
::
exp
(
bx
)));
};
};
float
beta_
=
1.0
f
;
float
beta_
=
1.0
f
;
...
...
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