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
ac9ef30b
Commit
ac9ef30b
authored
May 24, 2022
by
myamlak
Browse files
Review remarks: static_cast
parent
b7d9cde9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
library/include/ck/library/reference_tensor_operation/cpu/reference_cgemm.hpp
...ibrary/reference_tensor_operation/cpu/reference_cgemm.hpp
+8
-8
No files found.
library/include/ck/library/reference_tensor_operation/cpu/reference_cgemm.hpp
View file @
ac9ef30b
...
...
@@ -76,10 +76,10 @@ struct ReferenceCGemm : public device::BaseOperator
float
v_a_imag
;
float
v_b_imag
;
arg
.
a_element_op_
(
v_a_real
,
static_cast
<
const
float
>
(
arg
.
a_m_k_real_
(
m
,
k
)));
arg
.
a_element_op_
(
v_a_imag
,
static_cast
<
const
float
>
(
arg
.
a_m_k_imag_
(
m
,
k
)));
arg
.
b_element_op_
(
v_b_real
,
static_cast
<
const
float
>
(
arg
.
b_k_n_real_
(
k
,
n
)));
arg
.
b_element_op_
(
v_b_imag
,
static_cast
<
const
float
>
(
arg
.
b_k_n_imag_
(
k
,
n
)));
arg
.
a_element_op_
(
v_a_real
,
ck
::
type_convert
<
float
>
(
arg
.
a_m_k_real_
(
m
,
k
)));
arg
.
a_element_op_
(
v_a_imag
,
ck
::
type_convert
<
float
>
(
arg
.
a_m_k_imag_
(
m
,
k
)));
arg
.
b_element_op_
(
v_b_real
,
ck
::
type_convert
<
float
>
(
arg
.
b_k_n_real_
(
k
,
n
)));
arg
.
b_element_op_
(
v_b_imag
,
ck
::
type_convert
<
float
>
(
arg
.
b_k_n_imag_
(
k
,
n
)));
v_acc
+=
v_a_real
*
v_b_real
-
v_a_imag
*
v_b_imag
;
}
...
...
@@ -108,10 +108,10 @@ struct ReferenceCGemm : public device::BaseOperator
float
v_a_imag
;
float
v_b_imag
;
arg
.
a_element_op_
(
v_a_real
,
static_cast
<
const
float
>
(
arg
.
a_m_k_real_
(
m
,
k
)));
arg
.
a_element_op_
(
v_a_imag
,
static_cast
<
const
float
>
(
arg
.
a_m_k_imag_
(
m
,
k
)));
arg
.
b_element_op_
(
v_b_real
,
static_cast
<
const
float
>
(
arg
.
b_k_n_real_
(
k
,
n
)));
arg
.
b_element_op_
(
v_b_imag
,
static_cast
<
const
float
>
(
arg
.
b_k_n_imag_
(
k
,
n
)));
arg
.
a_element_op_
(
v_a_real
,
ck
::
type_convert
<
float
>
(
arg
.
a_m_k_real_
(
m
,
k
)));
arg
.
a_element_op_
(
v_a_imag
,
ck
::
type_convert
<
float
>
(
arg
.
a_m_k_imag_
(
m
,
k
)));
arg
.
b_element_op_
(
v_b_real
,
ck
::
type_convert
<
float
>
(
arg
.
b_k_n_real_
(
k
,
n
)));
arg
.
b_element_op_
(
v_b_imag
,
ck
::
type_convert
<
float
>
(
arg
.
b_k_n_imag_
(
k
,
n
)));
v_acc
+=
v_a_real
*
v_b_imag
+
v_a_imag
*
v_b_real
;
}
...
...
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