20.02
|
Namespaces | |
Filesystem | |
Processes | |
Sockets | |
Classes | |
class | CsvReader |
struct | CsvRow |
class | DataLayoutIndexed |
Provides access to the appropriate indexes for Channels, Height and Width based on DataLayout. More... | |
class | FloatingPointConverter |
struct | IsFloatingPointIterator |
class | ModelAccuracyChecker |
struct | ParserPrototxtFixture |
struct | SelectiveQuantizer |
struct | SelectiveQuantizer< armnn::BFloat16, false > |
struct | SelectiveQuantizer< armnn::Half, false > |
struct | SelectiveQuantizer< T, false > |
Typedefs | |
using | LabelCategoryNames = std::vector< std::string > |
Functions | |
bool | operator== (const armnn::DataLayout &dataLayout, const DataLayoutIndexed &indexed) |
Equality methods. More... | |
bool | operator== (const DataLayoutIndexed &indexed, const armnn::DataLayout &dataLayout) |
armnn::TensorShape | Permuted (const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings) |
armnn::TensorInfo | Permuted (const armnn::TensorInfo &info, const armnn::PermutationVector &mappings) |
void | Permute (const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize) |
armnn::TensorShape | GetTensorShape (unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout) |
armnn::TensorInfo | GetTensorInfo (unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType) |
std::pair< float, float > | FindMinMax (armnn::ITensorHandle *tensorHandle) |
armnn::TensorShape | ExpandDims (const armnn::TensorShape &tensorShape, int axis) |
unsigned int | GetNumElementsBetween (const armnn::TensorShape &shape, unsigned int firstAxisInclusive, unsigned int lastAxisExclusive) |
unsigned int | GetUnsignedAxis (const unsigned int inputDimension, const int axis) |
unsigned int | GetNumElementsAfter (const armnn::TensorShape &shape, unsigned int axis) |
std::pair< unsigned int, std::vector< float > > | GetPerAxisParams (const armnn::TensorInfo &info) |
armnn::TensorShape | TransposeTensorShape (const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings) |
armnn::TensorInfo | TransposeTensorShape (const armnn::TensorInfo &info, const armnn::PermutationVector &mappings) |
void | Transpose (const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize) |
CsvRow | ParseLine (const std::string &csvLine) |
template<typename TNodeId , typename TTargetNodes > | |
bool | GraphTopologicalSort (const TTargetNodes &targetNodes, std::function< std::vector< TNodeId >(TNodeId)> getIncomingEdges, std::vector< TNodeId > &outSorted) |
std::vector< std::string > | SplitBy (const std::string &originalString, const std::string &delimiter=" ", bool includeEmptyToken=false) |
Split a string into tokens by a delimiter. More... | |
std::string | Strip (const std::string &originalString, const std::string &characterSet=" ") |
Remove any preceding and trailing character specified in the characterSet. More... | |
void | ProcessConcatInputTensorInfo (armnn::TensorInfo &inputTensorInfo, armnn::OriginsDescriptor &concatDescriptor, const unsigned int &concatAxis, unsigned int inputIndex, unsigned int &mergeDimOrigin) |
void | CalculateReducedOutputTensoInfo (const armnn::TensorInfo &inputTensorInfo, const std::set< unsigned int > &axisSet, bool keepDims, armnn::TensorInfo &outputTensorInfo) |
Creates a tensor info after reducing the dimensions mentioned in axisData. More... | |
void | CalculateStridedSliceOutputTensorInfo (const armnn::TensorInfo &inputTensorInfo, const armnn::StridedSliceDescriptor &desc, armnn::TensorInfo &outputTensorInfo) |
Create output tensor info for a StridedSlice operator. More... | |
std::string | ConvertInt32ToOctalString (int value) |
Converts an int value into the Prototxt octal representation. More... | |
std::string | ConvertTensorShapeToString (const armnn::TensorShape &shape) |
Converts an TensorShape into Prototxt representation. More... | |
template<typename T > | |
T | SelectiveQuantize (float value, float scale, int32_t offset) |
template<typename T > | |
float | SelectiveDequantize (T value, float scale, int32_t offset) |
template<typename T , typename FloatIt , typename std::enable_if< IsFloatingPointIterator< FloatIt >::value, int >::type = 0> | |
std::vector< T > | QuantizedVector (FloatIt first, FloatIt last, float qScale, int32_t qOffset) |
template<typename T > | |
std::vector< T > | QuantizedVector (const std::vector< float > &array, float qScale=1.f, int32_t qOffset=0) |
template<typename T > | |
std::vector< T > | QuantizedVector (std::initializer_list< float > array, float qScale=1.f, int32_t qOffset=0) |
template<typename TContainer > | |
armnn::InputTensors | MakeInputTensors (const std::vector< armnn::BindingPointInfo > &inputBindings, const std::vector< TContainer > &inputDataContainers) |
template<typename TContainer > | |
armnn::OutputTensors | MakeOutputTensors (const std::vector< armnn::BindingPointInfo > &outputBindings, std::vector< TContainer > &outputDataContainers) |
void | CheckValidSize (std::initializer_list< size_t > validInputCounts, size_t actualValue, const char *validExpr, const char *actualExpr, const CheckLocation &location) |
uint32_t | NonNegative (const char *expr, int32_t value, const CheckLocation &location) |
int32_t | VerifyInt32 (const char *expr, int64_t value, const armnn::CheckLocation &location) |
Variables | |
const armnn::PermutationVector | NHWCToArmNN = { 0, 2, 3, 1 } |
const armnn::PermutationVector | ArmNNToNHWC = { 0, 3, 1, 2 } |
using LabelCategoryNames = std::vector<std::string> |
Definition at line 25 of file ModelAccuracyChecker.hpp.
void CalculateReducedOutputTensoInfo | ( | const armnn::TensorInfo & | inputTensorInfo, |
const std::set< unsigned int > & | axisSet, | ||
bool | keepDims, | ||
armnn::TensorInfo & | outputTensorInfo | ||
) |
Creates a tensor info after reducing the dimensions mentioned in axisData.
Definition at line 54 of file ParserHelper.cpp.
References TensorInfo::GetDataType(), TensorInfo::GetNumDimensions(), and TensorInfo::GetShape().
Referenced by BOOST_AUTO_TEST_CASE(), and armnnTfParser::OutputShapeOfSqueeze().
void CalculateStridedSliceOutputTensorInfo | ( | const armnn::TensorInfo & | inputTensorInfo, |
const armnn::StridedSliceDescriptor & | desc, | ||
armnn::TensorInfo & | outputTensorInfo | ||
) |
Create output tensor info for a StridedSlice operator.
Definition at line 105 of file ParserHelper.cpp.
References TensorInfo::GetDataType(), TensorInfo::GetNumDimensions(), TensorInfo::GetShape(), StridedSliceDescriptor::GetStartForAxis(), StridedSliceDescriptor::GetStopForAxis(), StridedSliceDescriptor::m_ShrinkAxisMask, and StridedSliceDescriptor::m_Stride.
Referenced by armnnTfParser::OutputShapeOfSqueeze().
void CheckValidSize | ( | std::initializer_list< size_t > | validInputCounts, |
size_t | actualValue, | ||
const char * | validExpr, | ||
const char * | actualExpr, | ||
const CheckLocation & | location | ||
) |
Definition at line 15 of file VerificationHelpers.cpp.
References CheckLocation::AsString().
std::string ConvertInt32ToOctalString | ( | int | value | ) |
Converts an int value into the Prototxt octal representation.
Definition at line 19 of file PrototxtConversions.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
std::string ConvertTensorShapeToString | ( | const armnn::TensorShape & | shape | ) |
Converts an TensorShape into Prototxt representation.
Definition at line 34 of file PrototxtConversions.cpp.
References TensorShape::GetNumDimensions().
Referenced by BOOST_AUTO_TEST_CASE().
TensorShape ExpandDims | ( | const armnn::TensorShape & | tensorShape, |
int | axis | ||
) |
Definition at line 85 of file TensorUtils.cpp.
References CHECK_LOCATION, TensorShape::GetNumDimensions(), and armnn::numeric_cast().
Referenced by BOOST_AUTO_TEST_CASE().
std::pair< float, float > FindMinMax | ( | armnn::ITensorHandle * | tensorHandle | ) |
Definition at line 58 of file TensorUtils.cpp.
References TensorShape::GetNumElements(), ITensorHandle::GetShape(), ITensorHandle::Map(), and ITensorHandle::Unmap().
Referenced by NetworkQuantizer::Refine().
unsigned int GetNumElementsAfter | ( | const armnn::TensorShape & | shape, |
unsigned int | axis | ||
) |
Definition at line 140 of file TensorUtils.cpp.
References TensorShape::GetNumDimensions().
Referenced by GetPerAxisParams().
unsigned int GetNumElementsBetween | ( | const armnn::TensorShape & | shape, |
unsigned int | firstAxisInclusive, | ||
unsigned int | lastAxisExclusive | ||
) |
Definition at line 113 of file TensorUtils.cpp.
References TensorShape::GetNumDimensions().
Referenced by armnn::ArgMinMax(), armnn::LogSoftmax(), and armnn::Softmax().
std::pair< unsigned int, std::vector< float > > GetPerAxisParams | ( | const armnn::TensorInfo & | info | ) |
Definition at line 152 of file TensorUtils.cpp.
References CHECK_LOCATION, TensorInfo::GetDataType(), armnn::GetDataTypeName(), GetNumElementsAfter(), TensorInfo::GetQuantizationDim(), TensorInfo::GetQuantizationScales(), TensorInfo::GetShape(), TensorInfo::HasPerAxisQuantization(), and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by armnn::MakeDecoder(), and armnn::MakeEncoder().
TensorInfo GetTensorInfo | ( | unsigned int | numberOfBatches, |
unsigned int | numberOfChannels, | ||
unsigned int | height, | ||
unsigned int | width, | ||
const armnn::DataLayout | dataLayout, | ||
const armnn::DataType | dataType | ||
) |
Definition at line 38 of file TensorUtils.cpp.
References CHECK_LOCATION, armnn::NCHW, and armnn::NHWC.
Referenced by CaffeParserBase::AddConvLayerWithDepthwiseConv(), CaffeParserBase::AddConvLayerWithSplits(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), CaffeParserBase::ParseBatchNormLayer(), CaffeParserBase::ParseConcatLayer(), CaffeParserBase::ParseConvLayer(), CaffeParserBase::ParseEltwiseLayer(), CaffeParserBase::ParseInnerProductLayer(), CaffeParserBase::ParseLRNLayer(), CaffeParserBase::ParsePoolingLayer(), CaffeParserBase::ParseReluLayer(), CaffeParserBase::ParseScaleLayer(), CaffeParserBase::ParseSoftmaxLayer(), and SimpleConvolution2dTestImpl().
TensorShape GetTensorShape | ( | unsigned int | numberOfBatches, |
unsigned int | numberOfChannels, | ||
unsigned int | height, | ||
unsigned int | width, | ||
const armnn::DataLayout | dataLayout | ||
) |
Definition at line 19 of file TensorUtils.cpp.
References CHECK_LOCATION, armnn::NCHW, and armnn::NHWC.
unsigned int GetUnsignedAxis | ( | const unsigned int | inputDimension, |
const int | axis | ||
) |
Definition at line 127 of file TensorUtils.cpp.
References armnn::numeric_cast().
Referenced by armnn::ArgMinMax(), ClArgMinMaxWorkload::ClArgMinMaxWorkload(), ArgMinMaxLayer::InferOutputShapes(), NeonArgMinMaxWorkload::NeonArgMinMaxWorkload(), and ArgMinMaxQueueDescriptor::Validate().
bool armnnUtils::GraphTopologicalSort | ( | const TTargetNodes & | targetNodes, |
std::function< std::vector< TNodeId >(TNodeId)> | getIncomingEdges, | ||
std::vector< TNodeId > & | outSorted | ||
) |
Definition at line 111 of file GraphTopologicalSort.hpp.
|
inline |
Definition at line 17 of file TensorIOUtils.hpp.
Referenced by InferenceModel< IParser, TDataType >::GetAllQuantizationParams(), main(), and InferenceModel< IParser, TDataType >::Run().
|
inline |
Definition at line 56 of file TensorIOUtils.hpp.
Referenced by InferenceModel< IParser, TDataType >::GetAllQuantizationParams(), main(), and InferenceModel< IParser, TDataType >::Run().
uint32_t NonNegative | ( | const char * | expr, |
int32_t | value, | ||
const CheckLocation & | location | ||
) |
Definition at line 36 of file VerificationHelpers.cpp.
References CheckLocation::AsString().
bool operator== | ( | const armnn::DataLayout & | dataLayout, |
const DataLayoutIndexed & | indexed | ||
) |
Equality methods.
Definition at line 34 of file DataLayoutIndexed.cpp.
References DataLayoutIndexed::GetDataLayout().
Referenced by BOOST_AUTO_TEST_CASE(), OutputSlot::Disconnect(), and DataLayoutIndexed::GetIndex().
bool operator== | ( | const DataLayoutIndexed & | indexed, |
const armnn::DataLayout & | dataLayout | ||
) |
Definition at line 39 of file DataLayoutIndexed.cpp.
References DataLayoutIndexed::GetDataLayout().
CsvRow armnnUtils::ParseLine | ( | const std::string & | csvLine | ) |
Definition at line 20 of file CsvReader.cpp.
References CsvRow::values.
Referenced by CsvReader::ParseFile(), and CsvReader::ParseVector().
void Permute | ( | const armnn::TensorShape & | dstShape, |
const armnn::PermutationVector & | mappings, | ||
const void * | src, | ||
void * | dst, | ||
size_t | dataTypeSize | ||
) |
Definition at line 121 of file Permute.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnnTfParser::ConvertTfTensorDataType(), armnn::DepthToSpace(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), PermuteLayer::PermuteLayer(), PermuteTensorNchwToNhwc(), PermuteTensorNhwcToNchw(), PrepareImageTensor< float >(), and SimpleConvolution2dTestImpl().
armnn::TensorShape Permuted | ( | const armnn::TensorShape & | srcShape, |
const armnn::PermutationVector & | mappings | ||
) |
Definition at line 98 of file Permute.cpp.
References TensorShape::GetNumDimensions(), PermutationVector::GetSize(), and armnn::MaxNumOfTensorDimensions.
Referenced by armnnTfParser::ConvertTfTensorDataType(), armnn::ConvertWeightTensorInfoFromArmnnToAcl(), PermuteLayer::InferOutputShapes(), Permuted(), PermuteInputsForConcat(), armnn::PermuteTensor(), PermuteTensorData(), PermuteTensorNchwToNhwc(), PermuteTensorNhwcToNchw(), and MovePermuteUpImpl::Run().
armnn::TensorInfo Permuted | ( | const armnn::TensorInfo & | info, |
const armnn::PermutationVector & | mappings | ||
) |
Definition at line 114 of file Permute.cpp.
References TensorInfo::GetShape(), Permuted(), and TensorInfo::SetShape().
void ProcessConcatInputTensorInfo | ( | armnn::TensorInfo & | inputTensorInfo, |
armnn::OriginsDescriptor & | concatDescriptor, | ||
const unsigned int & | concatAxis, | ||
unsigned int | inputIndex, | ||
unsigned int & | mergeDimOrigin | ||
) |
Definition at line 19 of file ParserHelper.cpp.
References CHECK_LOCATION, TensorInfo::GetNumDimensions(), OriginsDescriptor::GetNumDimensions(), TensorInfo::GetShape(), and OriginsDescriptor::SetViewOriginCoord().
Referenced by TfLiteParser::OutputShapeOfReshape().
std::vector<T> armnnUtils::QuantizedVector | ( | FloatIt | first, |
FloatIt | last, | ||
float | qScale, | ||
int32_t | qOffset | ||
) |
Definition at line 106 of file QuantizeHelper.hpp.
std::vector<T> armnnUtils::QuantizedVector | ( | const std::vector< float > & | array, |
float | qScale = 1.f , |
||
int32_t | qOffset = 0 |
||
) |
Definition at line 122 of file QuantizeHelper.hpp.
std::vector<T> armnnUtils::QuantizedVector | ( | std::initializer_list< float > | array, |
float | qScale = 1.f , |
||
int32_t | qOffset = 0 |
||
) |
Definition at line 128 of file QuantizeHelper.hpp.
float armnnUtils::SelectiveDequantize | ( | T | value, |
float | scale, | ||
int32_t | offset | ||
) |
Definition at line 92 of file QuantizeHelper.hpp.
References SelectiveQuantizer< T, DoQuantize >::Dequantize().
Referenced by ApplyBias().
T armnnUtils::SelectiveQuantize | ( | float | value, |
float | scale, | ||
int32_t | offset | ||
) |
Definition at line 86 of file QuantizeHelper.hpp.
References SelectiveQuantizer< T, DoQuantize >::Quantize().
std::vector< std::string > SplitBy | ( | const std::string & | originalString, |
const std::string & | delimiter = " " , |
||
bool | includeEmptyToken = false |
||
) |
Split a string into tokens by a delimiter.
[in] | originalString | Original string to be split |
[in] | delimiter | Delimiter used to split originalString |
[in] | includeEmptyToekn | If true, include empty tokens in the result |
originalString
by Definition at line 41 of file ModelAccuracyChecker.cpp.
Referenced by LoadModelOutputLabels(), and main().
std::string Strip | ( | const std::string & | originalString, |
const std::string & | characterSet = " " |
||
) |
Remove any preceding and trailing character specified in the characterSet.
[in] | originalString | Original string to be stripped |
[in] | characterSet | Set of characters to be stripped from originalString |
characterSet
from originalString
Definition at line 65 of file ModelAccuracyChecker.cpp.
Referenced by LoadModelOutputLabels().
void Transpose | ( | const armnn::TensorShape & | dstShape, |
const armnn::PermutationVector & | mappings, | ||
const void * | src, | ||
void * | dst, | ||
size_t | dataTypeSize | ||
) |
Definition at line 120 of file Transpose.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and TransposeLayer::TransposeLayer().
armnn::TensorShape TransposeTensorShape | ( | const armnn::TensorShape & | srcShape, |
const armnn::PermutationVector & | mappings | ||
) |
Definition at line 98 of file Transpose.cpp.
References TensorShape::GetNumDimensions(), PermutationVector::GetSize(), and armnn::MaxNumOfTensorDimensions.
Referenced by TransposeLayer::InferOutputShapes(), armnnTfParser::OutputShapeOfExpandDims(), MoveTransposeUpImpl::Run(), and TransposeTensorShape().
armnn::TensorInfo TransposeTensorShape | ( | const armnn::TensorInfo & | info, |
const armnn::PermutationVector & | mappings | ||
) |
Definition at line 113 of file Transpose.cpp.
References TensorInfo::GetShape(), TensorInfo::SetShape(), and TransposeTensorShape().
int32_t VerifyInt32 | ( | const char * | expr, |
int64_t | value, | ||
const armnn::CheckLocation & | location | ||
) |
Definition at line 55 of file VerificationHelpers.cpp.
References CheckLocation::AsString().
const armnn::PermutationVector ArmNNToNHWC = { 0, 3, 1, 2 } |
Definition at line 17 of file ParserHelper.cpp.
const armnn::PermutationVector NHWCToArmNN = { 0, 2, 3, 1 } |
Definition at line 16 of file ParserHelper.cpp.
Referenced by PrepareImageTensor< float >().