24.02
|
Go to the documentation of this file.
21 switch(weightsType.
value())
32 ARMNN_ASSERT_MSG(
false,
"GetBiasTypeFromWeightsType(): Unsupported data type.");
40 bool supported = rule();
41 if (!supported && reason)
43 reasonIfUnsupported.
value() += std::string(reason) +
"\n";
64 template<
typename T,
typename... Rest>
67 static_assert(std::is_same<T, TensorInfo>::value,
"Type T must be a TensorInfo");
74 template<
typename ... Ts>
92 template<
typename Container>
97 return dt == info.GetDataType();
114 m_Res = !
info.IsQuantized() || !
info.HasPerAxisQuantization();
128 template<
typename Container>
133 return dt == GetBiasTypeFromWeightsType(info.GetDataType()).value();
159 unsigned int sizeIn = (idx < offset) ? 1 : in[idx-offset];
171 unsigned int sizeOut = outShape[i];
175 m_Res &= ((sizeIn0 == sizeOut) || (sizeIn0 == 1)) &&
176 ((sizeIn1 == sizeOut) || (sizeIn1 == 1));
185 m_Res =
info.GetNumDimensions() == expectedNumDimensions;
193 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)
#define ARMNN_ASSERT_MSG(COND, MSG)
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)