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
0eff71a4
Commit
0eff71a4
authored
May 31, 2023
by
Adam Osewski
Browse files
Helper structures for padding decision.
parent
1faeddae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
include/ck/tensor_operation/gpu/device/matrix_padder.hpp
include/ck/tensor_operation/gpu/device/matrix_padder.hpp
+24
-6
No files found.
include/ck/tensor_operation/gpu/device/matrix_padder.hpp
View file @
0eff71a4
...
...
@@ -125,22 +125,40 @@ struct GemmGemmPadder
OPerTileType
OPerTile_
;
};
// M/N/KPerTileType could be index_t or Number<>
template
<
GemmSpecialization
GemmSpec
,
typename
MPerTileType
,
typename
NPerTileType
,
typename
KPerTileType
>
struct
GemmPadder
template
<
GemmSpecialization
GemmSpec
>
struct
GemmPadM
{
static
constexpr
bool
PadM
=
(
GemmSpec
==
GemmSpecialization
::
MPadding
||
GemmSpec
==
GemmSpecialization
::
MNPadding
||
GemmSpec
==
GemmSpecialization
::
MKPadding
||
GemmSpec
==
GemmSpecialization
::
MNKPadding
);
};
template
<
GemmSpecialization
GemmSpec
>
struct
GemmPadN
{
static
constexpr
bool
PadN
=
(
GemmSpec
==
GemmSpecialization
::
NPadding
||
GemmSpec
==
GemmSpecialization
::
MNPadding
||
GemmSpec
==
GemmSpecialization
::
NKPadding
||
GemmSpec
==
GemmSpecialization
::
MNKPadding
);
};
template
<
GemmSpecialization
GemmSpec
>
struct
GemmPadK
{
static
constexpr
bool
PadK
=
(
GemmSpec
==
GemmSpecialization
::
KPadding
||
GemmSpec
==
GemmSpecialization
::
MKPadding
||
GemmSpec
==
GemmSpecialization
::
NKPadding
||
GemmSpec
==
GemmSpecialization
::
MNKPadding
);
};
// M/N/KPerTileType could be index_t or Number<>
template
<
GemmSpecialization
GemmSpec
,
typename
MPerTileType
,
typename
NPerTileType
,
typename
KPerTileType
>
struct
GemmPadder
{
static
constexpr
bool
PadM
=
GemmPadM
<
GemmSpec
>::
PadM
;
static
constexpr
bool
PadN
=
GemmPadN
<
GemmSpec
>::
PadN
;
static
constexpr
bool
PadK
=
GemmPadK
<
GemmSpec
>::
PadK
;
template
<
typename
ADesc_MRaw_KRaw
>
__host__
__device__
constexpr
auto
...
...
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