24.08
|
Go to the documentation of this file.
20 switch(weightsType.
value())
39 bool supported = rule();
40 if (!supported && reason)
42 reasonIfUnsupported.
value() += std::string(reason) +
"\n";
63 template<
typename T,
typename... Rest>
66 static_assert(std::is_same<T, TensorInfo>::value,
"Type T must be a TensorInfo");
73 template<
typename ... Ts>
91 template<
typename Container>
96 return dt == info.GetDataType();
113 m_Res = !
info.IsQuantized() || !
info.HasPerAxisQuantization();
127 template<
typename Container>
132 return dt == GetBiasTypeFromWeightsType(info.GetDataType()).value();
158 unsigned int sizeIn = (idx < offset) ? 1 : in[idx-offset];
170 unsigned int sizeOut = outShape[i];
174 m_Res &= ((sizeIn0 == sizeOut) || (sizeIn0 == 1)) &&
175 ((sizeIn1 == sizeOut) || (sizeIn1 == 1));
184 m_Res =
info.GetNumDimensions() == expectedNumDimensions;
192 m_Res =
info.GetNumDimensions() >= numDimensionsToCompare;
unsigned int GetNumElements() const
ShapesAreSameRank(const TensorInfo &info0, const TensorInfo &info1)
BiasAndWeightsTypesMatch(const TensorInfo &biases, const TensorInfo &weights)
TensorNumDimensionsAreGreaterOrEqualTo(const TensorInfo &info, unsigned int numDimensionsToCompare)
float GetQuantizationScale() const
armnn::Optional< armnn::DataType > GetBiasTypeFromWeightsType(armnn::Optional< armnn::DataType > weightsType)
QuantizationParametersAreEqual(const TensorInfo &info0, const TensorInfo &info1)
TensorNumDimensionsAreCorrect(const TensorInfo &info, unsigned int expectedNumDimensions)
TypesAreEqual(const Ts &... ts)
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
BiasAndWeightsTypesCompatible(const TensorInfo &info, const Container &c)
DataType GetDataType() const
bool AllTypesAreEqualImpl(T)
const TensorShape & GetShape() const
unsigned int CalcInputSize(const TensorShape &in, const TensorShape &out, unsigned int idx)
Copyright (c) 2021 ARM Limited and Contributors.
ShapesAreBroadcastCompatible(const TensorInfo &in0, const TensorInfo &in1, const TensorInfo &out)
bool CheckSupportRule(F rule, Optional< std::string & > reasonIfUnsupported, const char *reason)
int32_t GetQuantizationOffset() const
TypeNotPerAxisQuantized(const TensorInfo &info)
ShapesAreSameTotalSize(const TensorInfo &info0, const TensorInfo &info1)
TypeAnyOf(const TensorInfo &info, const Container &c)
TypeIs(const TensorInfo &info, DataType dt)