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
e5e7adbd
Commit
e5e7adbd
authored
Sep 08, 2022
by
Po-Yen, Chen
Browse files
Extract local types as template parameters
parent
5e28dcda
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
include/ck/tensor_operation/gpu/device/device_permute.hpp
include/ck/tensor_operation/gpu/device/device_permute.hpp
+18
-11
include/ck/tensor_operation/gpu/grid/gridwise_permute.hpp
include/ck/tensor_operation/gpu/grid/gridwise_permute.hpp
+9
-9
No files found.
include/ck/tensor_operation/gpu/device/device_permute.hpp
View file @
e5e7adbd
...
...
@@ -82,8 +82,11 @@ template <typename InDataType,
index_t
NPerBlock
,
index_t
HPerBlock
,
index_t
WPerBlock
,
index_t
InBlockLdsExtraW
>
struct
DevicePermute
:
detail
::
DevicePermuteBase
<
DevicePermute
<
InDataType
,
index_t
InBlockLdsExtraW
,
typename
InBlockTransferThreadClusterLengths
,
typename
InBlockTransferThreadClusterArrangeOrder
>
struct
DevicePermute
:
detail
::
DevicePermuteBase
<
DevicePermute
<
InDataType
,
OutDataType
,
ElementwiseOperation
,
NumDim
,
...
...
@@ -91,7 +94,9 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
NPerBlock
,
HPerBlock
,
WPerBlock
,
InBlockLdsExtraW
>>
InBlockLdsExtraW
,
InBlockTransferThreadClusterLengths
,
InBlockTransferThreadClusterArrangeOrder
>>
{
static_assert
(
3
<=
NumDim
,
"Only accept at least 3D dimension tensor"
);
...
...
@@ -142,7 +147,9 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
NPerBlock
,
HPerBlock
,
WPerBlock
,
InBlockLdsExtraW
>
;
InBlockLdsExtraW
,
InBlockTransferThreadClusterLengths
,
InBlockTransferThreadClusterArrangeOrder
>
;
struct
Argument
:
public
BaseArgument
{
...
...
include/ck/tensor_operation/gpu/grid/gridwise_permute.hpp
View file @
e5e7adbd
...
...
@@ -99,7 +99,9 @@ template <typename InGridDesc,
index_t
NPerBlock
,
index_t
HPerBlock
,
index_t
WPerBlock
,
index_t
InBlockLdsExtraW
>
index_t
InBlockLdsExtraW
,
typename
InBlockTransferThreadClusterLengths
,
typename
InBlockTransferThreadClusterArrangeOrder
>
struct
GridwisePermute
{
static_assert
(
InGridDesc
::
GetNumOfDimension
()
==
OutGridDesc
::
GetNumOfDimension
());
...
...
@@ -203,8 +205,6 @@ struct GridwisePermute
static_cast
<
InDataType
*>
(
p_shared
),
in_block_desc
.
GetElementSpaceSize
());
using
SliceLengths
=
Sequence
<
1
,
HPerBlock
,
WPerBlock
>
;
using
ABlockTransferThreadClusterLengths
=
Sequence
<
1
,
16
,
BlockSize
/
16
>
;
using
ABlockTransferThreadClusterArrangeOrder
=
Sequence
<
0
,
1
,
2
>
;
using
ABlockTransferAccessOrder
=
Sequence
<
0
,
1
,
2
>
;
constexpr
index_t
ABlockTransferSrcVectorDim
=
2
;
...
...
@@ -222,8 +222,8 @@ struct GridwisePermute
PassThrough
,
InMemoryDataOperationEnum
::
Set
,
SliceLengths
,
A
BlockTransferThreadClusterLengths
,
A
BlockTransferThreadClusterArrangeOrder
,
In
BlockTransferThreadClusterLengths
,
In
BlockTransferThreadClusterArrangeOrder
,
InDataType
,
InDataType
,
decltype
(
in_grid_desc_n_h_w
),
...
...
@@ -261,8 +261,8 @@ struct GridwisePermute
PassThrough
,
InMemoryDataOperationEnum
::
Set
,
SliceLengths
,
A
BlockTransferThreadClusterLengths
,
A
BlockTransferThreadClusterArrangeOrder
,
In
BlockTransferThreadClusterLengths
,
In
BlockTransferThreadClusterArrangeOrder
,
InDataType
,
OutDataType
,
decltype
(
in_block_desc
),
...
...
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