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

Remove no-longer used type argument

parent 7a6dbadc
......@@ -6,8 +6,8 @@
using ADataType = F16;
using BDataType = F16;
using DevicePermuteInstance = ck::tensor_operation::device::
DevicePermute<ADataType, BDataType, PassThrough, 4, 8, S<8>, S<1>>;
using DevicePermuteInstance =
ck::tensor_operation::device::DevicePermute<ADataType, BDataType, PassThrough, 4, 8, 8, 1>;
#include "run_permute_example.inc"
......
......@@ -73,23 +73,16 @@ template <typename InDataType,
typename ElementwiseOperation,
index_t NumDim,
index_t MPerThread,
typename InScalarPerVectorSeq,
typename OutScalarPerVectorSeq>
index_t InScalarPerVector,
index_t OutScalarPerVector>
struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
OutDataType,
ElementwiseOperation,
NumDim,
MPerThread,
InScalarPerVectorSeq,
OutScalarPerVectorSeq>>
InScalarPerVector,
OutScalarPerVector>>
{
static constexpr int NumInput = 1;
static constexpr int NumOutput = 1;
static_assert(NumInput == InScalarPerVectorSeq::Size() &&
NumOutput == OutScalarPerVectorSeq::Size(),
"Tuple size is inconsistent with the number of in/out!");
using InDataTypePointer = const InDataType*;
using OutDataTypePointer = OutDataType*;
......@@ -156,8 +149,8 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
OutDataTypePointer,
ElementwiseOperation,
MPerThread,
InScalarPerVectorSeq,
OutScalarPerVectorSeq>;
InScalarPerVector,
OutScalarPerVector>;
struct Argument : public BaseArgument
{
......@@ -243,12 +236,12 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
};
bool valid = true;
if(!IsScalarPerVectorValid(arg.inLengths_, arg.inStrides_, InScalarPerVectorSeq::At(0)))
if(!IsScalarPerVectorValid(arg.inLengths_, arg.inStrides_, InScalarPerVector))
{
valid = false;
}
if(!IsScalarPerVectorValid(arg.inLengths_, arg.outStrides_, OutScalarPerVectorSeq::At(0)))
if(!IsScalarPerVectorValid(arg.inLengths_, arg.outStrides_, OutScalarPerVector))
{
valid = false;
}
......
......@@ -32,17 +32,10 @@ template <typename InGrid1dDesc,
typename OutDataTypePointer,
typename ElementwiseOperation,
index_t MPerThread,
typename InScalarPerVectorSeq,
typename OutScalarPerVectorSeq>
index_t InScalarPerVector,
index_t OutScalarPerVector>
struct GridwisePermute
{
static constexpr index_t NumInput = 1;
static constexpr index_t NumOutput = 1;
static_assert(NumInput == InScalarPerVectorSeq::Size() &&
NumOutput == OutScalarPerVectorSeq::Size(),
"Tuple size is inconsistent with the number of in/out!");
static constexpr auto I0 = Number<0>{};
static constexpr auto thread_buffer_desc_m =
......@@ -83,11 +76,11 @@ struct GridwisePermute
InDataType,
decltype(in_grid_1d_desc),
decltype(thread_buffer_desc_m),
Sequence<MPerThread>, // SliceLengths
Sequence<0>, // DimAccessOrder
0, // SrcVectorDim
InScalarPerVectorSeq::At(0), // ScalarPerVector
1, // SrcScalarStrideInVector
Sequence<MPerThread>, // SliceLengths
Sequence<0>, // DimAccessOrder
0, // SrcVectorDim
InScalarPerVector, // ScalarPerVector
1, // SrcScalarStrideInVector
false>{in_grid_1d_desc, thread_global_offset};
auto out_global_store =
......@@ -99,7 +92,7 @@ struct GridwisePermute
Sequence<MPerThread>, // SliceLengths
Sequence<0>, // DimAccessOrder
0, // SrcVectorDim
OutScalarPerVectorSeq::At(0),
OutScalarPerVector,
InMemoryDataOperationEnum::Set,
1,
false>(
......
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