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

Remove no-longer used template parameters

parent 48df84a4
...@@ -82,9 +82,7 @@ template <typename InDataType, ...@@ -82,9 +82,7 @@ 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>
index_t InScalarPerVector,
index_t OutScalarPerVector>
struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType, struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
OutDataType, OutDataType,
ElementwiseOperation, ElementwiseOperation,
...@@ -93,9 +91,7 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType, ...@@ -93,9 +91,7 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
NPerBlock, NPerBlock,
HPerBlock, HPerBlock,
WPerBlock, WPerBlock,
InBlockLdsExtraW, InBlockLdsExtraW>>
InScalarPerVector,
OutScalarPerVector>>
{ {
static_assert(3 <= NumDim, "Only accept at least 3D dimension tensor"); static_assert(3 <= NumDim, "Only accept at least 3D dimension tensor");
...@@ -146,9 +142,7 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType, ...@@ -146,9 +142,7 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
NPerBlock, NPerBlock,
HPerBlock, HPerBlock,
WPerBlock, WPerBlock,
InBlockLdsExtraW, InBlockLdsExtraW>;
InScalarPerVector,
OutScalarPerVector>;
struct Argument : public BaseArgument struct Argument : public BaseArgument
{ {
...@@ -228,30 +222,7 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType, ...@@ -228,30 +222,7 @@ struct DevicePermute : detail::DevicePermuteBase<DevicePermute<InDataType,
return false; return false;
} }
auto IsScalarPerVectorValid = [&](const std::array<index_t, NumDim>& lengths,
const std::array<index_t, NumDim>& strides,
index_t scalarPerVector) {
if(strides.back() == 1 && lengths.back() % scalarPerVector == 0)
return true; return true;
if(strides.back() != 1 && scalarPerVector == 1)
return true;
return false;
};
bool valid = true;
if(!IsScalarPerVectorValid(arg.inLengths_, arg.inStrides_, InScalarPerVector))
{
valid = false;
}
if(!IsScalarPerVectorValid(arg.outLengths_, arg.outStrides_, OutScalarPerVector))
{
valid = false;
}
return valid;
}; };
}; };
......
...@@ -99,9 +99,7 @@ template <typename InGridDesc, ...@@ -99,9 +99,7 @@ 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>
index_t InScalarPerVector,
index_t OutScalarPerVector>
struct GridwisePermute struct GridwisePermute
{ {
static_assert(InGridDesc::GetNumOfDimension() == OutGridDesc::GetNumOfDimension()); static_assert(InGridDesc::GetNumOfDimension() == OutGridDesc::GetNumOfDimension());
......
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