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
bbb5d943
"vscode:/vscode.git/clone" did not exist on "2b4f849db9cfd73c5c367b2ac124c8e48ef32430"
Commit
bbb5d943
authored
Sep 08, 2023
by
Jing Zhang
Browse files
fixed comments
parent
e10df63e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
example/42_groupnorm/groupnorm_sigmoid_mul_fp16.cpp
example/42_groupnorm/groupnorm_sigmoid_mul_fp16.cpp
+4
-0
include/ck/tensor_operation/gpu/element/unary_element_wise_operation.hpp
...or_operation/gpu/element/unary_element_wise_operation.hpp
+4
-0
No files found.
example/42_groupnorm/groupnorm_sigmoid_mul_fp16.cpp
View file @
bbb5d943
...
@@ -21,6 +21,10 @@ struct YElementOp
...
@@ -21,6 +21,10 @@ struct YElementOp
ck
::
is_same
<
X
,
ck
::
half_t
>::
value
,
ck
::
is_same
<
X
,
ck
::
half_t
>::
value
,
"Data type is not supported by this operation!"
);
"Data type is not supported by this operation!"
);
static_assert
(
ck
::
is_same
<
Y
,
float
>::
value
||
ck
::
is_same
<
Y
,
double
>::
value
||
ck
::
is_same
<
Y
,
ck
::
half_t
>::
value
,
"Data type is not supported by this operation!"
);
X
a
;
X
a
;
ck
::
tensor_operation
::
element_wise
::
Sigmoid
{}(
a
,
x
);
ck
::
tensor_operation
::
element_wise
::
Sigmoid
{}(
a
,
x
);
...
...
include/ck/tensor_operation/gpu/element/unary_element_wise_operation.hpp
View file @
bbb5d943
...
@@ -431,6 +431,10 @@ struct Swish
...
@@ -431,6 +431,10 @@ 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!"
);
static_assert
(
is_same
<
Y
,
float
>::
value
||
is_same
<
Y
,
double
>::
value
||
is_same
<
Y
,
ck
::
half_t
>::
value
,
"Data type is not supported by this operation!"
);
float
bx
=
-
beta_
*
type_convert
<
float
>
(
x
);
float
bx
=
-
beta_
*
type_convert
<
float
>
(
x
);
y
=
type_convert
<
Y
>
(
x
/
(
1.
f
+
ck
::
math
::
exp
(
bx
)));
y
=
type_convert
<
Y
>
(
x
/
(
1.
f
+
ck
::
math
::
exp
(
bx
)));
};
};
...
...
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