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
6880afdf
Commit
6880afdf
authored
Nov 28, 2022
by
letaoqin
Browse files
fix int8 overflow
parent
ad77ce8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
example/09_convnd_fwd/run_convnd_fwd_dl_example.inc
example/09_convnd_fwd/run_convnd_fwd_dl_example.inc
+1
-1
include/ck/tensor_operation/gpu/element/binary_element_wise_operation.hpp
...r_operation/gpu/element/binary_element_wise_operation.hpp
+2
-2
No files found.
example/09_convnd_fwd/run_convnd_fwd_dl_example.inc
View file @
6880afdf
...
@@ -11,7 +11,7 @@ bool run_convnd_fwd_dl_example(int argc, char* argv[])
...
@@ -11,7 +11,7 @@ bool run_convnd_fwd_dl_example(int argc, char* argv[])
bool
time_kernel
=
false
;
bool
time_kernel
=
false
;
ck
::
utils
::
conv
::
ConvParam
conv_param
{
ck
::
utils
::
conv
::
ConvParam
conv_param
{
2
,
1
,
128
,
128
,
192
,
{
3
,
3
},
{
14
,
14
},
{
1
,
1
},
{
1
,
1
},
{
0
,
0
},
{
0
,
0
}};
2
,
1
,
128
,
256
,
192
,
{
3
,
3
},
{
71
,
71
},
{
2
,
2
},
{
1
,
1
},
{
1
,
1
},
{
1
,
1
}};
if
(
argc
==
1
)
if
(
argc
==
1
)
{
{
...
...
include/ck/tensor_operation/gpu/element/binary_element_wise_operation.hpp
View file @
6880afdf
...
@@ -192,8 +192,8 @@ struct AddRelu
...
@@ -192,8 +192,8 @@ struct AddRelu
__host__
__device__
constexpr
void
__host__
__device__
constexpr
void
operator
()
<
int
,
int
,
int8_t
>
(
int
&
y
,
const
int
&
x0
,
const
int8_t
&
x1
)
const
operator
()
<
int
,
int
,
int8_t
>
(
int
&
y
,
const
int
&
x0
,
const
int8_t
&
x1
)
const
{
{
const
int
a
=
x0
+
x1
;
const
int
8_t
a
=
x0
+
x1
;
y
=
a
>
0
?
a
:
0
;
y
=
a
>
0
?
a
:
0
;
};
};
template
<
>
template
<
>
...
...
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