8 #include <boost/assert.hpp> 21 switch(weightsType.
value())
31 BOOST_ASSERT_MSG(
false,
"GetBiasTypeFromWeightsType(): Unsupported data type.");
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>
127 template<
typename Container>
158 unsigned int sizeIn = (idx < offset) ? 1 : in[idx-offset];
170 unsigned int sizeOut = outShape[i];
171 unsigned int sizeIn0 = CalcInputSize(shape0, outShape, i);
172 unsigned int sizeIn1 = CalcInputSize(shape1, outShape, i);
174 m_Res &= ((sizeIn0 == sizeOut) || (sizeIn0 == 1)) &&
175 ((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)
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
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