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
422a69b2
Commit
422a69b2
authored
Oct 18, 2023
by
letaoqin
Browse files
add static check for vector load
parent
6c971dc8
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
1 deletion
+23
-1
example/52_flash_atten_bias/grouped_multihead_attention_bias_backward_v2.cpp
...ten_bias/grouped_multihead_attention_bias_backward_v2.cpp
+1
-1
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_light_v1.hpp
...dwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_light_v1.hpp
+3
-0
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_light_v2.hpp
...dwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_light_v2.hpp
+4
-0
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_v1.hpp
...id/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_v1.hpp
+3
-0
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_v2.hpp
...id/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_v2.hpp
+4
-0
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_fwd_xdl_cshuffle_v2.hpp
...ion/gpu/grid/gridwise_batched_mha_fwd_xdl_cshuffle_v2.hpp
+4
-0
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_infer_xdl_cshuffle.hpp
...tion/gpu/grid/gridwise_batched_mha_infer_xdl_cshuffle.hpp
+4
-0
No files found.
example/52_flash_atten_bias/grouped_multihead_attention_bias_backward_v2.cpp
View file @
422a69b2
...
@@ -24,7 +24,7 @@ Kernel outputs:
...
@@ -24,7 +24,7 @@ Kernel outputs:
*/
*/
#define USING_MASK 0
#define USING_MASK 0
#define DIM
128
// DIM should be a multiple of 8.
#define DIM
64
// DIM should be a multiple of 8.
#include <iostream>
#include <iostream>
#include <numeric>
#include <numeric>
...
...
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_light_v1.hpp
View file @
422a69b2
...
@@ -88,6 +88,9 @@ template <typename InputDataType,
...
@@ -88,6 +88,9 @@ template <typename InputDataType,
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V1
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V1
{
{
static_assert
(
AK1Value
%
ABlockTransferDstScalarPerVector_AK1
==
0
);
static_assert
(
BK1Value
%
BBlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
KPerBlock
==
Gemm1NPerBlock
);
static_assert
(
KPerBlock
==
Gemm1NPerBlock
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
...
...
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_light_v2.hpp
View file @
422a69b2
...
@@ -96,6 +96,10 @@ template <typename InputDataType,
...
@@ -96,6 +96,10 @@ template <typename InputDataType,
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V2
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_Light_V2
{
{
static_assert
(
AK1Value
%
ABlockTransferDstScalarPerVector_AK1
==
0
);
static_assert
(
BK1Value
%
BBlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
B1K1Value
%
B1BlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
Gemm1NPerBlock
%
KPerBlock
==
0
);
static_assert
(
Gemm1NPerBlock
%
KPerBlock
==
0
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
...
...
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_v1.hpp
View file @
422a69b2
...
@@ -87,6 +87,9 @@ template <typename InputDataType,
...
@@ -87,6 +87,9 @@ template <typename InputDataType,
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V1
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V1
{
{
static_assert
(
AK1Value
%
ABlockTransferDstScalarPerVector_AK1
==
0
);
static_assert
(
BK1Value
%
BBlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
KPerBlock
==
Gemm1NPerBlock
);
static_assert
(
KPerBlock
==
Gemm1NPerBlock
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
...
...
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_bwd_xdl_cshuffle_qloop_b2t_v2.hpp
View file @
422a69b2
...
@@ -95,6 +95,10 @@ template <typename InputDataType,
...
@@ -95,6 +95,10 @@ template <typename InputDataType,
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V2
struct
GridwiseBatchedMultiheadAttentionBackward_Qloop_Xdl_CShuffle_V2
{
{
static_assert
(
AK1Value
%
ABlockTransferDstScalarPerVector_AK1
==
0
);
static_assert
(
BK1Value
%
BBlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
B1K1Value
%
B1BlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
Gemm1NPerBlock
%
KPerBlock
==
0
);
static_assert
(
Gemm1NPerBlock
%
KPerBlock
==
0
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
MPerBlock
%
Gemm1KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
static_assert
(
NPerBlock
%
Gemm2KPerBlock
==
0
);
...
...
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_fwd_xdl_cshuffle_v2.hpp
View file @
422a69b2
...
@@ -97,6 +97,10 @@ template <typename FloatAB,
...
@@ -97,6 +97,10 @@ template <typename FloatAB,
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
struct
GridwiseBatchedMultiheadAttentionForward_Xdl_CShuffle_V2
struct
GridwiseBatchedMultiheadAttentionForward_Xdl_CShuffle_V2
{
{
static_assert
(
AK1Value
%
ABlockTransferDstScalarPerVector_AK1
==
0
);
static_assert
(
BK1Value
%
BBlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
B1K1Value
%
B1BlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
D0BlockTransferSrcScalarPerVector
==
1
||
static_assert
(
D0BlockTransferSrcScalarPerVector
==
1
||
D0BlockTransferSrcScalarPerVector
==
2
||
D0BlockTransferSrcScalarPerVector
==
2
||
D0BlockTransferSrcScalarPerVector
==
4
,
D0BlockTransferSrcScalarPerVector
==
4
,
...
...
include/ck/tensor_operation/gpu/grid/gridwise_batched_mha_infer_xdl_cshuffle.hpp
View file @
422a69b2
...
@@ -88,6 +88,10 @@ template <typename FloatAB,
...
@@ -88,6 +88,10 @@ template <typename FloatAB,
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
PipelineVersion
PipelineVer
=
PipelineVersion
::
v1
>
struct
GridwiseMultiHeadFlashAttentionInfer_Xdl_CShuffle
struct
GridwiseMultiHeadFlashAttentionInfer_Xdl_CShuffle
{
{
static_assert
(
AK1Value
%
ABlockTransferDstScalarPerVector_AK1
==
0
);
static_assert
(
BK1Value
%
BBlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
B1K1Value
%
B1BlockTransferDstScalarPerVector_BK1
==
0
);
static_assert
(
D0BlockTransferSrcScalarPerVector
==
1
||
static_assert
(
D0BlockTransferSrcScalarPerVector
==
1
||
D0BlockTransferSrcScalarPerVector
==
2
||
D0BlockTransferSrcScalarPerVector
==
2
||
D0BlockTransferSrcScalarPerVector
==
4
,
D0BlockTransferSrcScalarPerVector
==
4
,
...
...
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