21 switch(weightsType.
value())
32 ARMNN_ASSERT_MSG(
false,
"GetBiasTypeFromWeightsType(): Unsupported data type.");
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>
128 template<
typename Container>
159 unsigned int sizeIn = (idx < offset) ? 1 : in[idx-offset];
171 unsigned int sizeOut = outShape[i];
172 unsigned int sizeIn0 = CalcInputSize(shape0, outShape, i);
173 unsigned int sizeIn1 = CalcInputSize(shape1, outShape, i);
175 m_Res &= ((sizeIn0 == sizeOut) || (sizeIn0 == 1)) &&
176 ((sizeIn1 == sizeOut) || (sizeIn1 == 1));
TypeNotPerAxisQuantized(const TensorInfo &info)
TypeAnyOf(const TensorInfo &info, const Container &c)
const TensorShape & GetShape() const
TypeIs(const TensorInfo &info, DataType dt)
bool HasPerAxisQuantization() const
ISubgraphViewConverter supported
QuantizationParametersAreEqual(const TensorInfo &info0, const TensorInfo &info1)
TypesAreEqual(const Ts &... ts)
Copyright (c) 2020 ARM Limited.
ShapesAreSameTotalSize(const TensorInfo &info0, const TensorInfo &info1)
armnn::Optional< armnn::DataType > GetBiasTypeFromWeightsType(armnn::Optional< armnn::DataType > weightsType)
#define ARMNN_ASSERT_MSG(COND, MSG)
ShapesAreBroadcastCompatible(const TensorInfo &in0, const TensorInfo &in1, const TensorInfo &out)
int32_t GetQuantizationOffset() const
BiasAndWeightsTypesCompatible(const TensorInfo &info, const Container &c)
float GetQuantizationScale() const
DataType GetDataType() const
BiasAndWeightsTypesMatch(const TensorInfo &biases, const TensorInfo &weights)
ShapesAreSameRank(const TensorInfo &info0, const TensorInfo &info1)
bool AllTypesAreEqualImpl(T)
unsigned int CalcInputSize(const TensorShape &in, const TensorShape &out, unsigned int idx)
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
TensorNumDimensionsAreCorrect(const TensorInfo &info, unsigned int expectedNumDimensions)
unsigned int GetNumDimensions() const
bool CheckSupportRule(F rule, Optional< std::string &> reasonIfUnsupported, const char *reason)
unsigned int GetNumElements() const