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
b76c8e62
Commit
b76c8e62
authored
Oct 11, 2023
by
letaoqin
Browse files
add type check
parent
4e6fd810
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
18 deletions
+62
-18
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_light_v1.hpp
...pl/device_batched_mha_bwd_xdl_cshuffle_qloop_light_v1.hpp
+10
-0
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_light_v2.hpp
...pl/device_batched_mha_bwd_xdl_cshuffle_qloop_light_v2.hpp
+10
-0
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_v1.hpp
...ice/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_v1.hpp
+7
-3
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_v2.hpp
...ice/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_v2.hpp
+7
-3
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_light_v1.hpp
...pl/device_grouped_mha_bwd_xdl_cshuffle_qloop_light_v1.hpp
+7
-3
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_light_v2.hpp
...pl/device_grouped_mha_bwd_xdl_cshuffle_qloop_light_v2.hpp
+7
-3
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_v1.hpp
...ice/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_v1.hpp
+7
-3
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_v2.hpp
...ice/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_v2.hpp
+7
-3
No files found.
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_light_v1.hpp
View file @
b76c8e62
...
@@ -1293,6 +1293,16 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V1
...
@@ -1293,6 +1293,16 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V1
return
false
;
return
false
;
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
if
(
KzRaw
%
2
!=
0
)
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
// Check vector load/store requirement
// Check vector load/store requirement
const
auto
a_stride_lowest
=
const
auto
a_stride_lowest
=
ABlockTransferSrcVectorDim
==
2
?
arg
.
a_mz_kz_strides_
[
1
]
:
arg
.
a_mz_kz_strides_
[
0
];
ABlockTransferSrcVectorDim
==
2
?
arg
.
a_mz_kz_strides_
[
1
]
:
arg
.
a_mz_kz_strides_
[
0
];
...
...
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_light_v2.hpp
View file @
b76c8e62
...
@@ -1325,6 +1325,16 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V2
...
@@ -1325,6 +1325,16 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V2
return
false
;
return
false
;
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
if
(
KzRaw
%
2
!=
0
)
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
// Check vector load/store requirement
// Check vector load/store requirement
const
auto
a_stride_lowest
=
const
auto
a_stride_lowest
=
ABlockTransferSrcVectorDim
==
2
?
arg
.
a_mz_kz_strides_
[
1
]
:
arg
.
a_mz_kz_strides_
[
0
];
ABlockTransferSrcVectorDim
==
2
?
arg
.
a_mz_kz_strides_
[
1
]
:
arg
.
a_mz_kz_strides_
[
0
];
...
...
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_v1.hpp
View file @
b76c8e62
...
@@ -1153,10 +1153,14 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V1
...
@@ -1153,10 +1153,14 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V1
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
(
KzRaw
%
2
!=
0
)
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
if
(
KzRaw
%
2
!=
0
)
return
false
;
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
}
// Check vector load/store requirement
// Check vector load/store requirement
...
...
include/ck/tensor_operation/gpu/device/impl/device_batched_mha_bwd_xdl_cshuffle_qloop_v2.hpp
View file @
b76c8e62
...
@@ -1190,10 +1190,14 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V2
...
@@ -1190,10 +1190,14 @@ struct DeviceBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V2
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
(
KzRaw
%
2
!=
0
)
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
if
(
KzRaw
%
2
!=
0
)
return
false
;
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
}
// Check vector load/store requirement
// Check vector load/store requirement
...
...
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_light_v1.hpp
View file @
b76c8e62
...
@@ -1336,10 +1336,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V1
...
@@ -1336,10 +1336,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V1
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
(
KzRaw
%
2
!=
0
)
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
if
(
KzRaw
%
2
!=
0
)
return
false
;
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
}
// Check vector load/store requirement
// Check vector load/store requirement
...
...
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_light_v2.hpp
View file @
b76c8e62
...
@@ -1408,10 +1408,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V2
...
@@ -1408,10 +1408,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V2
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
(
KzRaw
%
2
!=
0
)
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
if
(
KzRaw
%
2
!=
0
)
return
false
;
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
}
// Check vector load/store requirement
// Check vector load/store requirement
...
...
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_v1.hpp
View file @
b76c8e62
...
@@ -1182,10 +1182,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V1
...
@@ -1182,10 +1182,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V1
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
(
KzRaw
%
2
!=
0
)
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
if
(
KzRaw
%
2
!=
0
)
return
false
;
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
}
// Check vector load/store requirement
// Check vector load/store requirement
...
...
include/ck/tensor_operation/gpu/device/impl/device_grouped_mha_bwd_xdl_cshuffle_qloop_v2.hpp
View file @
b76c8e62
...
@@ -1253,10 +1253,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V2
...
@@ -1253,10 +1253,14 @@ struct DeviceGroupedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V2
}
}
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
// saving dQ data with atomic_add instruction, so KzRaw must be a multiple of 2
if
(
KzRaw
%
2
!=
0
)
if
constexpr
(
is_same
<
OutputDataType
,
half_t
>::
value
||
is_same
<
OutputDataType
,
bhalf_t
>::
value
)
{
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
if
(
KzRaw
%
2
!=
0
)
return
false
;
{
std
::
cout
<<
"K_q must be a multiple of 2"
<<
std
::
endl
;
return
false
;
}
}
}
// Check vector load/store requirement
// Check vector load/store requirement
...
...
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