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
cb8f87cb
Commit
cb8f87cb
authored
Aug 25, 2022
by
Adam Osewski
Browse files
Fix #ifdef statements.
parent
24b7b354
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
22 deletions
+36
-22
example/22_cgemm/cgemm_xdl_common.hpp
example/22_cgemm/cgemm_xdl_common.hpp
+36
-22
No files found.
example/22_cgemm/cgemm_xdl_common.hpp
View file @
cb8f87cb
...
@@ -130,17 +130,19 @@ bool run_cgemm_xdl(ck::index_t M,
...
@@ -130,17 +130,19 @@ bool run_cgemm_xdl(ck::index_t M,
Tensor
<
KernelBDataType
>
b_k_n_real_converted
(
b_k_n_real
);
Tensor
<
KernelBDataType
>
b_k_n_real_converted
(
b_k_n_real
);
Tensor
<
KernelBDataType
>
b_k_n_imag_converted
(
b_k_n_imag
);
Tensor
<
KernelBDataType
>
b_k_n_imag_converted
(
b_k_n_imag
);
a_m_k_real
=
a_m_k_real_converted
;
a_m_k_real
_device_buf
.
ToDevice
(
a_m_k_real_converted
.
mData
.
data
())
;
a_m_k_imag
=
a_m_k_imag_converted
;
a_m_k_imag
_device_buf
.
ToDevice
(
a_m_k_imag_converted
.
mData
.
data
())
;
b_k_n_real
=
b_k_n_real_converted
;
b_k_n_real
_device_buf
.
ToDevice
(
b_k_n_real_converted
.
mData
.
data
())
;
b_k_n_imag
=
b_k_n_imag_converted
;
b_k_n_imag
_device_buf
.
ToDevice
(
b_k_n_imag_converted
.
mData
.
data
())
;
}
}
else
#endif // CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
#endif // CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
{
a_m_k_real_device_buf
.
ToDevice
(
a_m_k_real
.
mData
.
data
());
a_m_k_real_device_buf
.
ToDevice
(
a_m_k_real
.
mData
.
data
());
a_m_k_imag_device_buf
.
ToDevice
(
a_m_k_imag
.
mData
.
data
());
a_m_k_imag_device_buf
.
ToDevice
(
a_m_k_imag
.
mData
.
data
());
b_k_n_real_device_buf
.
ToDevice
(
b_k_n_real
.
mData
.
data
());
b_k_n_real_device_buf
.
ToDevice
(
b_k_n_real
.
mData
.
data
());
b_k_n_imag_device_buf
.
ToDevice
(
b_k_n_imag
.
mData
.
data
());
b_k_n_imag_device_buf
.
ToDevice
(
b_k_n_imag
.
mData
.
data
());
}
auto
a_element_op
=
AElementwiseOperation
{};
auto
a_element_op
=
AElementwiseOperation
{};
auto
b_element_op
=
BElementwiseOperation
{};
auto
b_element_op
=
BElementwiseOperation
{};
...
@@ -217,21 +219,33 @@ bool run_cgemm_xdl(ck::index_t M,
...
@@ -217,21 +219,33 @@ bool run_cgemm_xdl(ck::index_t M,
const
Tensor
<
CDataType
>
c_m_n_real_device_result_converted
(
c_m_n_real_device_result
);
const
Tensor
<
CDataType
>
c_m_n_real_device_result_converted
(
c_m_n_real_device_result
);
const
Tensor
<
CDataType
>
c_m_n_imag_device_result_converted
(
c_m_n_imag_device_result
);
const
Tensor
<
CDataType
>
c_m_n_imag_device_result_converted
(
c_m_n_imag_device_result
);
c_m_n_real_device_result
=
c_m_n_real_device_result_converted
;
result
=
ck
::
utils
::
check_err
(
c_m_n_real_device_result_converted
.
mData
,
c_m_n_imag_device_result
=
c_m_n_imag_device_result_converted
;
c_m_n_real_host_result
.
mData
,
"Verification error: incorrect results in real part!"
,
1e-2
f
,
1e-1
f
);
result
=
result
&&
ck
::
utils
::
check_err
(
c_m_n_imag_device_result_converted
.
mData
,
c_m_n_imag_host_result
.
mData
,
"Verification error: incorrect results in imaginary part!"
,
1e-2
f
,
1e-1
f
);
}
}
else
#endif // CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
#endif // CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
result
=
ck
::
utils
::
check_err
(
c_m_n_real_device_result
.
mData
,
{
c_m_n_real_host_result
.
mData
,
result
=
ck
::
utils
::
check_err
(
c_m_n_real_device_result
.
mData
,
"Verification error: incorrect results in real part!"
,
c_m_n_real_host_result
.
mData
,
1e-2
f
,
"Verification error: incorrect results in real part!"
,
1e-1
f
);
1e-2
f
,
result
=
result
&&
1e-1
f
);
ck
::
utils
::
check_err
(
c_m_n_imag_device_result
.
mData
,
result
=
result
&&
ck
::
utils
::
check_err
(
c_m_n_imag_host_result
.
mData
,
c_m_n_imag_device_result
.
mData
,
"Verification error: incorrect results in imaginary part!"
,
c_m_n_imag_host_result
.
mData
,
1e-2
f
,
"Verification error: incorrect results in imaginary part!"
,
1e-1
f
);
1e-2
f
,
1e-1
f
);
}
return
result
;
return
result
;
}
}
...
...
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