Commit 16b116a9 authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Move 'NumDim' template param to the first

parent b56ddad3
...@@ -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"
......
...@@ -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"
......
...@@ -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"
......
...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment