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
f1245c3b
Commit
f1245c3b
authored
Jan 29, 2022
by
rocking
Browse files
Refine bias elementwise op
parent
d6dff178
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
composable_kernel/include/tensor_operation/element_wise_operation.hpp
...ernel/include/tensor_operation/element_wise_operation.hpp
+2
-7
No files found.
composable_kernel/include/tensor_operation/element_wise_operation.hpp
View file @
f1245c3b
...
@@ -26,14 +26,9 @@ struct PassThrough
...
@@ -26,14 +26,9 @@ struct PassThrough
// TODO - Move bias functor to the kernel
// TODO - Move bias functor to the kernel
struct
Bias
struct
Bias
{
{
__host__
__device__
constexpr
void
operator
()(
floa
t
&
y_plus_bias
,
const
floa
t
&
y
,
const
floa
t
&
bias
)
const
__host__
__device__
constexpr
void
operator
()(
half_
t
&
y_plus_bias
,
const
half_
t
&
y
,
const
half_
t
&
bias
)
const
{
{
y_plus_bias
=
y
+
bias
;
y_plus_bias
=
y_plus_bias
=
y
+
bias
;
}
__host__
__device__
constexpr
void
operator
()(
half_t
&
y_plus_bias
,
const
half_t
&
y
,
const
float
&
bias
)
const
{
y_plus_bias
=
y
+
bias
;
}
}
};
};
...
...
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