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
666bdad1
Commit
666bdad1
authored
Mar 18, 2021
by
root
Browse files
clean
parent
f744524e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
240 additions
and
242 deletions
+240
-242
composable_kernel/include/driver/driver_dynamic_convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw.hpp
...convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw.hpp
+17
-16
composable_kernel/include/tensor_operation/gridwise_dynamic_gemm_v2.hpp
...nel/include/tensor_operation/gridwise_dynamic_gemm_v2.hpp
+216
-219
composable_kernel/include/tensor_operation/threadwise_gemm_v3.hpp
...le_kernel/include/tensor_operation/threadwise_gemm_v3.hpp
+3
-3
driver/include/device_dynamic_convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw.hpp
...convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw.hpp
+4
-4
No files found.
composable_kernel/include/driver/driver_dynamic_convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw.hpp
View file @
666bdad1
...
...
@@ -13,13 +13,13 @@ template <index_t BlockSize,
typename
Float
,
typename
AccFloat
,
index_t
KPerBlock
,
index_t
HPerBlock
,
index_t
WPerBlock
,
index_t
CYX
PerBlock
,
index_t
H
o
PerBlock
,
index_t
W
o
PerBlock
,
index_t
E
PerBlock
,
index_t
KPerThread
,
index_t
HPerThread
,
index_t
WPerThread
,
index_t
CYX
PerThread
,
index_t
E
PerThread
,
typename
GemmABlockTransferThreadSliceLengths_GemmK_GemmM
,
typename
GemmABlockTransferThreadClusterLengths_GemmK_GemmM
,
index_t
GemmABlockTransferSrcScalarPerVector_GemmK
,
...
...
@@ -123,10 +123,10 @@ struct DriverDynamicConvolutionForwardImplicitGemm_v5r1_nchw_kcyx_nkhw_pad
make_tuple
(
Sequence
<
1
>
{},
Sequence
<
0
>
{},
Sequence
<
2
>
{},
Sequence
<
3
>
{}),
make_tuple
(
Sequence
<
0
>
{},
Sequence
<
1
>
{},
Sequence
<
2
>
{},
Sequence
<
3
>
{}));
const
auto
CYX
=
C
*
Y
*
X
;
const
auto
E
=
C
*
Y
*
X
;
if
(
!
(
K
%
KPerBlock
==
0
&&
Ho
%
HPerBlock
==
0
&&
Wo
%
WPerBlock
==
0
&&
CYX
%
CYX
PerBlock
==
0
))
if
(
!
(
K
%
KPerBlock
==
0
&&
Ho
%
H
o
PerBlock
==
0
&&
Wo
%
W
o
PerBlock
==
0
&&
E
%
E
PerBlock
==
0
))
{
throw
std
::
runtime_error
(
"wrong! GEMM size no divisible"
);
}
...
...
@@ -165,7 +165,7 @@ struct DriverDynamicConvolutionForwardImplicitGemm_v5r1_nchw_kcyx_nkhw_pad
#if 1
// GEMM
using
gridwise_gemm
=
GridwiseDynamicGemm_km_kn_mn_v
3
<
using
gridwise_gemm
=
GridwiseDynamicGemm_km_kn_mn_v
2
<
BlockSize
,
Float
,
AccFloat
,
...
...
@@ -174,13 +174,13 @@ struct DriverDynamicConvolutionForwardImplicitGemm_v5r1_nchw_kcyx_nkhw_pad
decltype
(
in_gemmk_n_ho_wo_global_desc
),
decltype
(
out_gemmm_n_ho_wo_global_desc
),
KPerBlock
,
HPerBlock
,
WPerBlock
,
CYX
PerBlock
,
H
o
PerBlock
,
W
o
PerBlock
,
E
PerBlock
,
KPerThread
,
HPerThread
,
WPerThread
,
CYX
PerThread
,
E
PerThread
,
GemmABlockTransferThreadSliceLengths_GemmK_GemmM
,
GemmABlockTransferThreadClusterLengths_GemmK_GemmM
,
Sequence
<
1
,
0
>
,
...
...
@@ -205,11 +205,11 @@ struct DriverDynamicConvolutionForwardImplicitGemm_v5r1_nchw_kcyx_nkhw_pad
decltype
(
a_k_m_global_move_slice_window_iterator_hack
),
decltype
(
b_k_n_global_move_slice_window_iterator_hack
)
>
;
const
auto
GridSize
=
(
K
/
KPerBlock
)
*
(
Ho
/
HPerBlock
)
*
(
Wo
/
WPerBlock
)
*
N
;
const
auto
GridSize
=
(
K
/
KPerBlock
)
*
(
Ho
/
H
o
PerBlock
)
*
(
Wo
/
W
o
PerBlock
)
*
N
;
const
bool
has_main_k_block_loop
=
(
CYX
+
CYX
PerBlock
)
/
(
2
*
CYX
PerBlock
)
>
1
;
const
bool
has_main_k_block_loop
=
(
E
+
E
PerBlock
)
/
(
2
*
E
PerBlock
)
>
1
;
const
bool
has_double_tail_k_block_loop
=
(
CYX
/
CYX
PerBlock
)
%
2
==
0
;
const
bool
has_double_tail_k_block_loop
=
(
E
/
E
PerBlock
)
%
2
==
0
;
index_t
nrepeat
=
100
;
...
...
@@ -225,6 +225,7 @@ struct DriverDynamicConvolutionForwardImplicitGemm_v5r1_nchw_kcyx_nkhw_pad
for
(
index_t
j
=
0
;
j
<
nrepeat
;
++
j
)
{
#if 0
{
const auto kernel =
run_gridwise_operation<gridwise_gemm,
...
...
@@ -251,7 +252,7 @@ struct DriverDynamicConvolutionForwardImplicitGemm_v5r1_nchw_kcyx_nkhw_pad
integral_constant<bool, true>{},
integral_constant<bool, false>{});
}
#
if 0
#
else
if
(
has_main_k_block_loop
&&
has_double_tail_k_block_loop
)
{
const
auto
kernel
=
...
...
composable_kernel/include/tensor_operation/gridwise_dynamic_gemm_v2.hpp
View file @
666bdad1
This diff is collapsed.
Click to expand it.
composable_kernel/include/tensor_operation/threadwise_gemm_v3.hpp
View file @
666bdad1
...
...
@@ -57,10 +57,10 @@ struct ThreadwiseGemm_km_kn_mn_v3
constexpr
auto
H
=
BDesc
{}.
GetLength
(
I2
);
constexpr
auto
W
=
BDesc
{}.
GetLength
(
I3
);
constexpr
auto
CYX
=
ADesc
{}.
GetLength
(
I0
);
constexpr
auto
K
=
ADesc
{}.
GetLength
(
I1
);
constexpr
auto
E
=
ADesc
{}.
GetLength
(
I0
);
constexpr
auto
K
=
ADesc
{}.
GetLength
(
I1
);
static_for
<
0
,
CYX
,
1
>
{}([
&
](
auto
e
)
{
static_for
<
0
,
E
,
1
>
{}([
&
](
auto
e
)
{
static_for
<
0
,
K
,
1
>
{}([
&
](
auto
k
)
{
static_for
<
0
,
H
,
1
>
{}([
&
](
auto
h
)
{
static_for
<
0
,
W
,
1
>
{}([
&
](
auto
w
)
{
...
...
driver/include/device_dynamic_convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw.hpp
View file @
666bdad1
...
...
@@ -73,15 +73,15 @@ void device_dynamic_convolution_forward_implicit_gemm_v5r1_nchw_kcyx_nkhw(InDesc
constexpr
index_t
KPerBlock
=
16
;
constexpr
index_t
HPerBlock
=
16
;
constexpr
index_t
WPerBlock
=
16
;
constexpr
index_t
CYXPerBlock
=
2
*
3
*
3
;
constexpr
index_t
CYXPerBlock
=
4
;
constexpr
index_t
KPerThread
=
4
;
constexpr
index_t
HPerThread
=
2
;
constexpr
index_t
WPerThread
=
2
;
constexpr
index_t
CYXPerThread
=
2
;
constexpr
index_t
CYXPerThread
=
4
;
using
GemmABlockTransferThreadSliceLengths_GemmK_GemmM
=
Sequence
<
4
,
1
>
;
using
GemmABlockTransferThreadClusterLengths_GemmK_GemmM
=
Sequence
<
9
,
16
>
;
using
GemmABlockTransferThreadSliceLengths_GemmK_GemmM
=
Sequence
<
1
,
1
>
;
using
GemmABlockTransferThreadClusterLengths_GemmK_GemmM
=
Sequence
<
4
,
16
>
;
constexpr
index_t
GemmABlockTransferSrcScalarPerVector_GemmK
=
1
;
constexpr
index_t
GemmABlockTransferDstScalarPerVector_GemmM
=
1
;
...
...
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