"tests/vscode:/vscode.git/clone" did not exist on "f1a32203aa806a49f69ff0d439b6b9af80b86230"
Commit e5e7adbd authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Extract local types as template parameters

parent 5e28dcda
...@@ -82,16 +82,21 @@ template <typename InDataType, ...@@ -82,16 +82,21 @@ template <typename InDataType,
index_t NPerBlock, index_t NPerBlock,
index_t HPerBlock, index_t HPerBlock,
index_t WPerBlock, index_t WPerBlock,
index_t InBlockLdsExtraW> index_t InBlockLdsExtraW,
struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType, typename InBlockTransferThreadClusterLengths,
OutDataType, typename InBlockTransferThreadClusterArrangeOrder>
ElementwiseOperation, struct DevicePermute
NumDim, : detail::DevicePermuteBase<DevicePermute<InDataType,
BlockSize, OutDataType,
NPerBlock, ElementwiseOperation,
HPerBlock, NumDim,
WPerBlock, BlockSize,
InBlockLdsExtraW>> NPerBlock,
HPerBlock,
WPerBlock,
InBlockLdsExtraW,
InBlockTransferThreadClusterLengths,
InBlockTransferThreadClusterArrangeOrder>>
{ {
static_assert(3 <= NumDim, "Only accept at least 3D dimension tensor"); static_assert(3 <= NumDim, "Only accept at least 3D dimension tensor");
...@@ -142,7 +147,9 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType, ...@@ -142,7 +147,9 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
NPerBlock, NPerBlock,
HPerBlock, HPerBlock,
WPerBlock, WPerBlock,
InBlockLdsExtraW>; InBlockLdsExtraW,
InBlockTransferThreadClusterLengths,
InBlockTransferThreadClusterArrangeOrder>;
struct Argument : public BaseArgument struct Argument : public BaseArgument
{ {
......
...@@ -99,7 +99,9 @@ template <typename InGridDesc, ...@@ -99,7 +99,9 @@ template <typename InGridDesc,
index_t NPerBlock, index_t NPerBlock,
index_t HPerBlock, index_t HPerBlock,
index_t WPerBlock, index_t WPerBlock,
index_t InBlockLdsExtraW> index_t InBlockLdsExtraW,
typename InBlockTransferThreadClusterLengths,
typename InBlockTransferThreadClusterArrangeOrder>
struct GridwisePermute struct GridwisePermute
{ {
static_assert(InGridDesc::GetNumOfDimension() == OutGridDesc::GetNumOfDimension()); static_assert(InGridDesc::GetNumOfDimension() == OutGridDesc::GetNumOfDimension());
...@@ -202,10 +204,8 @@ struct GridwisePermute ...@@ -202,10 +204,8 @@ struct GridwisePermute
auto in_block_buf = make_dynamic_buffer<AddressSpaceEnum::Lds>( auto in_block_buf = make_dynamic_buffer<AddressSpaceEnum::Lds>(
static_cast<InDataType*>(p_shared), in_block_desc.GetElementSpaceSize()); static_cast<InDataType*>(p_shared), in_block_desc.GetElementSpaceSize());
using SliceLengths = Sequence<1, HPerBlock, WPerBlock>; using SliceLengths = Sequence<1, HPerBlock, WPerBlock>;
using ABlockTransferThreadClusterLengths = Sequence<1, 16, BlockSize / 16>; using ABlockTransferAccessOrder = Sequence<0, 1, 2>;
using ABlockTransferThreadClusterArrangeOrder = Sequence<0, 1, 2>;
using ABlockTransferAccessOrder = Sequence<0, 1, 2>;
constexpr index_t ABlockTransferSrcVectorDim = 2; constexpr index_t ABlockTransferSrcVectorDim = 2;
constexpr index_t ABlockTransferDstVectorDim = 1; constexpr index_t ABlockTransferDstVectorDim = 1;
...@@ -222,8 +222,8 @@ struct GridwisePermute ...@@ -222,8 +222,8 @@ struct GridwisePermute
PassThrough, PassThrough,
InMemoryDataOperationEnum::Set, InMemoryDataOperationEnum::Set,
SliceLengths, SliceLengths,
ABlockTransferThreadClusterLengths, InBlockTransferThreadClusterLengths,
ABlockTransferThreadClusterArrangeOrder, InBlockTransferThreadClusterArrangeOrder,
InDataType, InDataType,
InDataType, InDataType,
decltype(in_grid_desc_n_h_w), decltype(in_grid_desc_n_h_w),
...@@ -261,8 +261,8 @@ struct GridwisePermute ...@@ -261,8 +261,8 @@ struct GridwisePermute
PassThrough, PassThrough,
InMemoryDataOperationEnum::Set, InMemoryDataOperationEnum::Set,
SliceLengths, SliceLengths,
ABlockTransferThreadClusterLengths, InBlockTransferThreadClusterLengths,
ABlockTransferThreadClusterArrangeOrder, InBlockTransferThreadClusterArrangeOrder,
InDataType, InDataType,
OutDataType, OutDataType,
decltype(in_block_desc), decltype(in_block_desc),
......
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