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
16b116a9
Commit
16b116a9
authored
Sep 15, 2022
by
Po-Yen, Chen
Browse files
Move 'NumDim' template param to the first
parent
b56ddad3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
example/37_permute/permute_1xHxW_fp16.cpp
example/37_permute/permute_1xHxW_fp16.cpp
+5
-5
example/37_permute/permute_HxWx4_fp16.cpp
example/37_permute/permute_HxWx4_fp16.cpp
+5
-5
example/37_permute/permute_NxHxW_fp16.cpp
example/37_permute/permute_NxHxW_fp16.cpp
+5
-5
include/ck/tensor_operation/gpu/device/device_permute.hpp
include/ck/tensor_operation/gpu/device/device_permute.hpp
+4
-4
No files found.
example/37_permute/permute_1xHxW_fp16.cpp
View file @
16b116a9
...
@@ -8,11 +8,11 @@ using OutDataType = F16;
...
@@ -8,11 +8,11 @@ using OutDataType = F16;
// clang-format off
// clang-format off
using
DevicePermuteInstance
=
ck
::
tensor_operation
::
device
::
DevicePermute
using
DevicePermuteInstance
=
ck
::
tensor_operation
::
device
::
DevicePermute
// ######| InData| OutData| Elementwise|
NumDim|
Block| NPer| HPer| WPer| InBlock| InBlockTransfer| InBlockTransfer| Src| Dst| Src| Dst|
// ######|
NumDim|
InData| OutData| Elementwise| Block| NPer| HPer| WPer| InBlock| InBlockTransfer| InBlockTransfer| Src| Dst| Src| Dst|
// ######| Type| Type| Operation|
|
Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|
|
Type| Type| Operation| Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|
|
| | | | | | | | | | | | | |
// ######|
|
| |
| | | | | | | | | | | |
// ######|
|
| | | | | | | | | | | | | |
// ######|
|
| |
| | | | | | | | | | | |
<
InDataType
,
OutDataType
,
PassThrough
,
3
,
256
,
1
,
32
,
32
,
3
,
S
<
1
,
32
,
8
>
,
S
<
0
,
1
,
2
>
,
2
,
1
,
2
,
1
>
;
<
3
,
InDataType
,
OutDataType
,
PassThrough
,
256
,
1
,
32
,
32
,
3
,
S
<
1
,
32
,
8
>
,
S
<
0
,
1
,
2
>
,
2
,
1
,
2
,
1
>
;
// clang-format on
// clang-format on
#include "run_permute_element_example.inc"
#include "run_permute_element_example.inc"
...
...
example/37_permute/permute_HxWx4_fp16.cpp
View file @
16b116a9
...
@@ -10,11 +10,11 @@ static_assert(sizeof(BundleType) % sizeof(DataType) == 0);
...
@@ -10,11 +10,11 @@ static_assert(sizeof(BundleType) % sizeof(DataType) == 0);
// clang-format off
// clang-format off
using
DevicePermuteInstance
=
ck
::
tensor_operation
::
device
::
DevicePermute
using
DevicePermuteInstance
=
ck
::
tensor_operation
::
device
::
DevicePermute
// ######| InData| OutData| Elementwise|
NumDim|
Block| NPer| HPer| WPer| InBlock| InBlockTransfer| InBlockTransfer| Src| Dst| Src| Dst|
// ######|
NumDim|
InData|
OutData| Elementwise| Block| NPer| HPer| WPer| InBlock| InBlockTransfer| InBlockTransfer| Src| Dst| Src| Dst|
// ######| Type| Type| Operation|
|
Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|
|
Type|
Type| Operation| Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|
| | | | | | | | | | | | | | |
// ######| | | |
| | | | | | | | | | | |
// ######|
| | | | | | | | | | | | | | |
// ######| | | |
| | | | | | | | | | | |
<
BundleType
,
BundleType
,
PassThrough
,
3
,
256
,
1
,
32
,
32
,
5
,
S
<
1
,
32
,
8
>
,
S
<
0
,
1
,
2
>
,
2
,
1
,
4
,
1
>
;
<
3
,
BundleType
,
BundleType
,
PassThrough
,
256
,
1
,
32
,
32
,
5
,
S
<
1
,
32
,
8
>
,
S
<
0
,
1
,
2
>
,
2
,
1
,
4
,
1
>
;
// clang-format on
// clang-format on
#include "run_permute_bundle_example.inc"
#include "run_permute_bundle_example.inc"
...
...
example/37_permute/permute_NxHxW_fp16.cpp
View file @
16b116a9
...
@@ -8,11 +8,11 @@ using OutDataType = F16;
...
@@ -8,11 +8,11 @@ using OutDataType = F16;
// clang-format off
// clang-format off
using
DevicePermuteInstance
=
ck
::
tensor_operation
::
device
::
DevicePermute
using
DevicePermuteInstance
=
ck
::
tensor_operation
::
device
::
DevicePermute
// ######| InData| OutData| Elementwise|
NumDim|
Block| NPer| HPer| WPer| InBlock| InBlockTransfer| InBlockTransfer| Src| Dst| Src| Dst|
// ######|
NumDim|
InData| OutData| Elementwise| Block| NPer| HPer| WPer| InBlock| InBlockTransfer| InBlockTransfer| Src| Dst| Src| Dst|
// ######| Type| Type| Operation|
|
Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|
|
Type| Type| Operation| Size| Block| Block| Block| LdsExtraW| ThreadClusterLengths| ThreadClusterArrangeOrder| VectorDim| VectorDim| ScalarPerVector| ScalarPerVector|
// ######|
|
| | | | | | | | | | | | | |
// ######|
|
| |
| | | | | | | | | | | |
// ######|
|
| | | | | | | | | | | | | |
// ######|
|
| |
| | | | | | | | | | | |
<
InDataType
,
OutDataType
,
PassThrough
,
3
,
128
,
4
,
16
,
8
,
6
,
S
<
2
,
16
,
4
>
,
S
<
0
,
1
,
2
>
,
2
,
1
,
2
,
1
>
;
<
3
,
InDataType
,
OutDataType
,
PassThrough
,
128
,
4
,
16
,
8
,
6
,
S
<
2
,
16
,
4
>
,
S
<
0
,
1
,
2
>
,
2
,
1
,
2
,
1
>
;
// clang-format on
// clang-format on
#include "run_permute_element_example.inc"
#include "run_permute_element_example.inc"
...
...
include/ck/tensor_operation/gpu/device/device_permute.hpp
View file @
16b116a9
...
@@ -26,10 +26,10 @@ namespace device {
...
@@ -26,10 +26,10 @@ namespace device {
// ^^^^^^^^^^^
// ^^^^^^^^^^^
// output shape: [d[0], d[1], d[2], ..., d[NumDim-3], d[NumDim-1], d[NumDim-2]]
// output shape: [d[0], d[1], d[2], ..., d[NumDim-3], d[NumDim-1], d[NumDim-2]]
// ^^^^^^^^^^^
// ^^^^^^^^^^^
template
<
typename
InDataType
,
template
<
index_t
NumDim
,
typename
InDataType
,
typename
OutDataType
,
typename
OutDataType
,
typename
ElementwiseOperation
,
typename
ElementwiseOperation
,
index_t
NumDim
,
index_t
BlockSize
,
index_t
BlockSize
,
index_t
NPerBlock
,
index_t
NPerBlock
,
index_t
HPerBlock
,
index_t
HPerBlock
,
...
@@ -45,10 +45,10 @@ struct DevicePermute : DevicePermuteBaseCRTP<NumDim,
...
@@ -45,10 +45,10 @@ struct DevicePermute : DevicePermuteBaseCRTP<NumDim,
InDataType
,
InDataType
,
OutDataType
,
OutDataType
,
ElementwiseOperation
,
ElementwiseOperation
,
DevicePermute
<
InDataType
,
DevicePermute
<
NumDim
,
InDataType
,
OutDataType
,
OutDataType
,
ElementwiseOperation
,
ElementwiseOperation
,
NumDim
,
BlockSize
,
BlockSize
,
NPerBlock
,
NPerBlock
,
HPerBlock
,
HPerBlock
,
...
...
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