21 switch(weightsType.
value())
33 ARMNN_ASSERT_MSG(
false,
"GetBiasTypeFromWeightsType(): Unsupported data type.");
42 if (!supported && reason)
44 reasonIfUnsupported.
value() += std::string(reason) +
"\n";
65 template<
typename T,
typename... Rest>
68 static_assert(std::is_same<T, TensorInfo>::value,
"Type T must be a TensorInfo");
75 template<
typename ... Ts>
93 template<
typename Container>
129 template<
typename Container>
160 unsigned int sizeIn = (idx < offset) ? 1 : in[idx-offset];
172 unsigned int sizeOut = outShape[i];
173 unsigned int sizeIn0 = CalcInputSize(shape0, outShape, i);
174 unsigned int sizeIn1 = CalcInputSize(shape1, outShape, i);
176 m_Res &= ((sizeIn0 == sizeOut) || (sizeIn0 == 1)) &&
177 ((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