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
09b97676
Commit
09b97676
authored
May 28, 2022
by
ltqin
Browse files
optimize main loop
parent
5173bdde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
example/01_gemm/gemm_xdl_skip_lds_fp16.cpp
example/01_gemm/gemm_xdl_skip_lds_fp16.cpp
+6
-6
include/ck/tensor_operation/gpu/grid/gridwise_gemm_xdlops_skip_lds_v2r3.hpp
...operation/gpu/grid/gridwise_gemm_xdlops_skip_lds_v2r3.hpp
+2
-2
No files found.
example/01_gemm/gemm_xdl_skip_lds_fp16.cpp
View file @
09b97676
...
@@ -51,7 +51,7 @@ using BDataType = ck::half_t;
...
@@ -51,7 +51,7 @@ using BDataType = ck::half_t;
using CDataType = ck::half_t;
using CDataType = ck::half_t;
using AccDataType = float;
using AccDataType = float;
#else
#else
<
F32
,
F32
,
F32
,
F32
,
Row
,
Col
,
Row
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
64
,
16
,
16
,
4
,
1
,
16
,
16
,
1
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
1
,
1
,
true
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
1
,
1
,
true
,
7
,
1
>
;
<
F32
,
F32
,
F32
,
F32
,
Row
,
Col
,
Row
,
PassThrough
,
PassThrough
,
PassThrough
,
GemmDefault
,
64
,
16
,
16
,
4
,
4
,
16
,
16
,
1
,
1
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
4
,
4
,
true
,
S
<
4
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
4
,
4
,
true
,
7
,
1
>
;
using
ADataType
=
float
;
using
ADataType
=
float
;
using
BDataType
=
float
;
using
BDataType
=
float
;
using
CDataType
=
float
;
using
CDataType
=
float
;
...
@@ -85,14 +85,14 @@ int main(int argc, char* argv[])
...
@@ -85,14 +85,14 @@ int main(int argc, char* argv[])
int
nrepeat
=
5
;
int
nrepeat
=
5
;
// GEMM shape
// GEMM shape
#if
0
#if
1
ck
::
index_t
M
=
16
;
ck
::
index_t
M
=
16
;
ck::index_t N =
4096
;
ck
::
index_t
N
=
1152
;
ck::index_t K =
64
;
ck
::
index_t
K
=
5120
;
ck::index_t StrideA =
64
;
ck
::
index_t
StrideA
=
5120
;
ck
::
index_t
StrideB
=
5120
;
ck
::
index_t
StrideB
=
5120
;
ck::index_t StrideC =
4096
;
ck
::
index_t
StrideC
=
1152
;
#else
#else
ck
::
index_t
M
=
16
;
ck
::
index_t
M
=
16
;
ck
::
index_t
N
=
16
;
ck
::
index_t
N
=
16
;
...
...
include/ck/tensor_operation/gpu/grid/gridwise_gemm_xdlops_skip_lds_v2r3.hpp
View file @
09b97676
...
@@ -687,13 +687,13 @@ struct GridwiseGemm_k0mk1_k0nk1_mn_xdlops_skip_lds_v2r3
...
@@ -687,13 +687,13 @@ struct GridwiseGemm_k0mk1_k0nk1_mn_xdlops_skip_lds_v2r3
do
do
{
{
a_blockwise_copy
.
RunRead
(
a_grid_desc_k0_m_k1
,
a_grid_buf
);
a_blockwise_copy
.
RunRead
(
a_grid_desc_k0_m_k1
,
a_grid_buf
);
// block_sync_lds();
b_threadwise_copy
.
Run
(
b_grid_desc_k0_k1_k2_n0_n1_n2_n3_k3
,
b_threadwise_copy
.
Run
(
b_grid_desc_k0_k1_k2_n0_n1_n2_n3_k3
,
b_grid_buf
,
b_grid_buf
,
b_thread_desc_k0_k1_k2_n0_n1_n2_n3_k3
,
b_thread_desc_k0_k1_k2_n0_n1_n2_n3_k3
,
make_tuple
(
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
),
make_tuple
(
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
),
b_thread_odd_buf
);
b_thread_odd_buf
);
blockwise_gemm
.
ResetABlockStartWindow
();
blockwise_gemm
.
ResetABlockStartWindow
();
block_sync_lds
();
blockwise_gemm
.
Run
(
a_block_buf
,
b_thread_even_buf
,
c_thread_buf
);
blockwise_gemm
.
Run
(
a_block_buf
,
b_thread_even_buf
,
c_thread_buf
);
// only move b windows
// only move b windows
...
@@ -705,7 +705,7 @@ struct GridwiseGemm_k0mk1_k0nk1_mn_xdlops_skip_lds_v2r3
...
@@ -705,7 +705,7 @@ struct GridwiseGemm_k0mk1_k0nk1_mn_xdlops_skip_lds_v2r3
b_thread_desc_k0_k1_k2_n0_n1_n2_n3_k3
,
b_thread_desc_k0_k1_k2_n0_n1_n2_n3_k3
,
make_tuple
(
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
),
make_tuple
(
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
,
I0
),
b_thread_even_buf
);
b_thread_even_buf
);
// block_sync_lds();
blockwise_gemm
.
MoveABlockSliceWindow
();
blockwise_gemm
.
MoveABlockSliceWindow
();
blockwise_gemm
.
Run
(
a_block_buf
,
b_thread_odd_buf
,
c_thread_buf
);
blockwise_gemm
.
Run
(
a_block_buf
,
b_thread_odd_buf
,
c_thread_buf
);
...
...
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