20.11
|
#include <Tensor.hpp>
Public Member Functions | |
TensorInfo () | |
Empty (invalid) constructor. More... | |
TensorInfo (const TensorShape &shape, DataType dataType, float quantizationScale=0.0f, int32_t quantizationOffset=0) | |
TensorInfo (unsigned int numDimensions, const unsigned int *dimensionSizes, DataType dataType, float quantizationScale=0.0f, int32_t quantizationOffset=0) | |
TensorInfo (const TensorShape &shape, DataType dataType, const std::vector< float > &quantizationScales, unsigned int quantizationDim) | |
TensorInfo (unsigned int numDimensions, const unsigned int *dimensionSizes, DataType dataType, const std::vector< float > &quantizationScales, unsigned int quantizationDim) | |
TensorInfo (const TensorInfo &other) | |
TensorInfo & | operator= (const TensorInfo &other) |
bool | operator== (const TensorInfo &other) const |
bool | operator!= (const TensorInfo &other) const |
const TensorShape & | GetShape () const |
TensorShape & | GetShape () |
void | SetShape (const TensorShape &newShape) |
unsigned int | GetNumDimensions () const |
unsigned int | GetNumElements () const |
DataType | GetDataType () const |
void | SetDataType (DataType type) |
bool | HasMultipleQuantizationScales () const |
bool | HasPerAxisQuantization () const |
std::vector< float > | GetQuantizationScales () const |
void | SetQuantizationScales (const std::vector< float > &scales) |
float | GetQuantizationScale () const |
void | SetQuantizationScale (float scale) |
int32_t | GetQuantizationOffset () const |
void | SetQuantizationOffset (int32_t offset) |
Optional< unsigned int > | GetQuantizationDim () const |
void | SetQuantizationDim (const Optional< unsigned int > &quantizationDim) |
bool | IsQuantized () const |
bool | IsTypeSpaceMatch (const TensorInfo &other) const |
Check that the types are the same and, if quantize, that the quantization parameters are the same. More... | |
unsigned int | GetNumBytes () const |
Definition at line 152 of file Tensor.hpp.
TensorInfo | ( | ) |
Empty (invalid) constructor.
Definition at line 341 of file Tensor.cpp.
TensorInfo | ( | const TensorShape & | shape, |
DataType | dataType, | ||
float | quantizationScale = 0.0f , |
||
int32_t | quantizationOffset = 0 |
||
) |
Definition at line 346 of file Tensor.cpp.
References TensorInfo::SetQuantizationOffset(), and TensorInfo::SetQuantizationScale().
TensorInfo | ( | unsigned int | numDimensions, |
const unsigned int * | dimensionSizes, | ||
DataType | dataType, | ||
float | quantizationScale = 0.0f , |
||
int32_t | quantizationOffset = 0 |
||
) |
Definition at line 357 of file Tensor.cpp.
References TensorInfo::SetQuantizationOffset(), and TensorInfo::SetQuantizationScale().
TensorInfo | ( | const TensorShape & | shape, |
DataType | dataType, | ||
const std::vector< float > & | quantizationScales, | ||
unsigned int | quantizationDim | ||
) |
Definition at line 369 of file Tensor.cpp.
References TensorInfo::SetQuantizationDim(), and TensorInfo::SetQuantizationScales().
TensorInfo | ( | unsigned int | numDimensions, |
const unsigned int * | dimensionSizes, | ||
DataType | dataType, | ||
const std::vector< float > & | quantizationScales, | ||
unsigned int | quantizationDim | ||
) |
Definition at line 380 of file Tensor.cpp.
References TensorInfo::SetQuantizationDim(), and TensorInfo::SetQuantizationScales().
TensorInfo | ( | const TensorInfo & | other | ) |
Definition at line 392 of file Tensor.cpp.
|
inline |
Definition at line 194 of file Tensor.hpp.
Referenced by BiasAndWeightsTypesCompatible::BiasAndWeightsTypesCompatible(), BiasAndWeightsTypesMatch::BiasAndWeightsTypesMatch(), armnn::BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), armnn::CheckScaleSetOnQuantizedType(), armnn::CheckTensorDataTypesEqual(), armnn::ClConvertFp16ToFp32WorkloadValidate(), armnn::ClConvertFp32ToFp16WorkloadValidate(), armnn::ConvertBf16ToFp32Weight(), armnn::optimizations::ConvertWeight(), TfLiteParser::CreateNetworkFromBinary(), armnn::CreateQuantizedConst(), RefDepthToSpaceWorkload::Execute(), RefStridedSliceWorkload::Execute(), RefSliceWorkload::Execute(), RefLstmWorkload::Execute(), BFloat16ToFloat32::Func(), Float16ToFloat32::Func(), Float32ToBFloat16::Func(), Float32ToFloat16::Func(), armnn::GetBiasDataType(), TfLiteParser::GetBuffer(), Layer::GetDataType(), armnnUtils::GetPerAxisParams(), armnn::GetUnpaddedTensorStrides(), armnn::InitializeArmComputeTensorData(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), SampleDynamicLayerSupport::IsAdditionSupported(), RefLayerSupport::IsConvertFp16ToFp32Supported(), RefLayerSupport::IsConvertFp32ToFp16Supported(), RefLayerSupport::IsConvolution2dSupported(), RefLayerSupport::IsDepthwiseConvolutionSupported(), NeonLayerSupport::IsFloorSupported(), armnn::IsFloorSupported(), RefLayerSupport::IsFullyConnectedSupported(), ClLayerSupport::IsQLstmSupported(), NeonLayerSupport::IsQLstmSupported(), ClLayerSupport::IsSplitterSupported(), NeonLayerSupport::IsSplitterSupported(), RefLayerSupport::IsTransposeConvolution2dSupported(), main(), armnn::MakeDecoder(), armnn::MakeEncoder(), armnnTfParser::OutputShapeOfExpandDims(), TfLiteParser::OutputShapeOfReshape(), armnnTfParser::OutputShapeOfSqueeze(), armnn::PermuteTensor(), ConvertFp32NetworkToFp16Impl::Run(), TypeAnyOf::TypeAnyOf(), TypeIs::TypeIs(), ArgMinMaxQueueDescriptor::Validate(), FullyConnectedQueueDescriptor::Validate(), Convolution2dQueueDescriptor::Validate(), DepthwiseConvolution2dQueueDescriptor::Validate(), QuantizeQueueDescriptor::Validate(), EqualQueueDescriptor::Validate(), ConvertBf16ToFp32QueueDescriptor::Validate(), ConvertFp32ToBf16QueueDescriptor::Validate(), ConvertFp16ToFp32QueueDescriptor::Validate(), ConvertFp32ToFp16QueueDescriptor::Validate(), GreaterQueueDescriptor::Validate(), GatherQueueDescriptor::Validate(), DequantizeQueueDescriptor::Validate(), TransposeConvolution2dQueueDescriptor::Validate(), ComparisonQueueDescriptor::Validate(), LogicalBinaryQueueDescriptor::Validate(), armnn::VerifyTensorInfoDataType(), QuantizerVisitor::VisitInputLayer(), QuantizerVisitor::VisitOutputLayer(), and SerializerVisitor::VisitQuantizedLstmLayer().
unsigned int GetNumBytes | ( | ) | const |
Definition at line 418 of file Tensor.cpp.
References armnn::GetDataTypeSize(), and TensorInfo::GetNumElements().
Referenced by RefTensorHandle::Allocate(), SampleTensorHandle::Allocate(), ScopedCpuTensorHandle::Allocate(), ClDepthwiseConvolutionWorkload::ClDepthwiseConvolutionWorkload(), armnnTfLiteParser::ComputeWrappedIndex(), ConstTensor::ConstTensor(), TfLiteParser::CreateNetworkFromBinary(), RefReshapeWorkload::Execute(), SampleTensorHandle::Import(), SampleTensorHandle::Manage(), RefTensorHandle::Manage(), RefTensorHandle::Map(), NeonDepthwiseConvolutionWorkload::NeonDepthwiseConvolutionWorkload(), OnnxParser::OnnxParser(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), armnn::PermuteTensor(), RefConstantWorkload::PostAllocationConfigure(), armnn::ReorderWeightChannelsForAcl(), and ScopedCpuTensorHandle::ScopedCpuTensorHandle().
|
inline |
Definition at line 191 of file Tensor.hpp.
Referenced by armnn::ArgMinMax(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnn::boost_test_print_type(), armnnTfParser::CalculatePaddedOutputTensorInfo(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), armnnTfParser::CheckPaddingTensor(), armnn::ComputeAclAxis(), armnn::ComputePositiveAxis(), armnn::ComputeSoftmaxAclAxis(), armnnTfLiteParser::ComputeWrappedIndex(), armnn::Concatenate(), armnn::Debug(), RefRankWorkload::Execute(), armnn::Gather(), armnn::GetBiasDataType(), GetTensorShapeAsArray(), RefLayerSupport::IsBatchToSpaceNdSupported(), RefLayerSupport::IsMeanSupported(), armnn::LogSoftmax(), MakeTensor(), armnn::Mean(), armnnTfParser::OutputShapeOfExpandDims(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), armnnTfParser::OutputShapeOfSqueeze(), CaffeParserBase::ParseConcatLayer(), CaffeParserBase::ParseInnerProductLayer(), RefFullyConnectedWorkload::PostAllocationConfigure(), armnnUtils::ProcessConcatInputTensorInfo(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), AddBroadcastReshapeLayerImpl::Run(), ParserFlatbuffersFixture::RunTest(), armnn::Softmax(), armnn::Split(), armnn::Splitter(), armnn::Stack(), armnnCaffeParser::TensorDescToBlobShape(), TensorNumDimensionsAreCorrect::TensorNumDimensionsAreCorrect(), TfParser::TfParser(), FullyConnectedQueueDescriptor::Validate(), MeanQueueDescriptor::Validate(), PadQueueDescriptor::Validate(), InstanceNormalizationQueueDescriptor::Validate(), L2NormalizationQueueDescriptor::Validate(), StridedSliceQueueDescriptor::Validate(), GatherQueueDescriptor::Validate(), SliceQueueDescriptor::Validate(), FillLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), and MeanLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 192 of file Tensor.hpp.
Referenced by armnn::Activation(), BOOST_FIXTURE_TEST_CASE(), armnnTfLiteParser::ComputeWrappedIndex(), Concat2dTestImpl(), Concat3dTestImpl(), Concat4dTestImpl(), armnn::ConvertBf16ToFp32Weight(), armnnTfParser::ConvertTfTensorDataType(), armnn::optimizations::ConvertWeight(), TfLiteParser::CreateNetworkFromBinary(), armnn::CreateQuantizedConst(), armnn::Debug(), armnn::Dequantize(), armnn::DetectionPostProcess(), RefConvertFp32ToBf16Workload::Execute(), RefConvertBf16ToFp32Workload::Execute(), RefConvertFp16ToFp32Workload::Execute(), RefConvertFp32ToFp16Workload::Execute(), RefFakeQuantizationFloat32Workload::Execute(), RefFloorWorkload::Execute(), SampleDynamicAdditionWorkload::Execute(), RefStackWorkload::Execute(), RefDebugWorkload< DataType >::Execute(), BFloat16ToFloat32::Func(), Float16ToFloat32::Func(), Float32ToBFloat16::Func(), Float32ToFloat16::Func(), armnn::Gather(), armnn::GetBiasDataType(), TensorInfo::GetNumBytes(), MakeRandomTensor(), MakeTensor(), OnnxParser::OnnxParser(), armnnTfParser::OutputShapeOfExpandDims(), Deserializer::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), armnn::Pad(), PermuteOutputForConcat(), PermuteTensorData(), armnn::Quantize(), QuantizeData(), ShapesAreSameTotalSize::ShapesAreSameTotalSize(), armnn::Splitter(), TfParser::TfParser(), armnnDeserializer::ToConstTensor(), and SpaceToBatchNdQueueDescriptor::Validate().
Optional< unsigned int > GetQuantizationDim | ( | ) | const |
Definition at line 485 of file Tensor.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::GetBiasDataType(), armnnUtils::GetPerAxisParams(), armnnUtils::Permuted(), and SerializerVisitor::VisitQuantizedLstmLayer().
int32_t GetQuantizationOffset | ( | ) | const |
Definition at line 469 of file Tensor.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), armnn::CheckScaleSetOnQuantizedType(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::Dequantize(), armnn::GetBiasDataType(), TensorInfo::IsTypeSpaceMatch(), armnn::MakeDecoder(), armnn::MakeEncoder(), MakeRandomTensor(), TfLiteParser::OutputShapeOfReshape(), QuantizationParametersAreEqual::QuantizationParametersAreEqual(), armnn::Quantize(), QuantizeData(), SimpleConvolution2dTestImpl(), and SerializerVisitor::VisitQuantizedLstmLayer().
float GetQuantizationScale | ( | ) | const |
Definition at line 452 of file Tensor.cpp.
References ARMNN_ASSERT, and TensorInfo::HasMultipleQuantizationScales().
Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), armnn::CheckScaleSetOnQuantizedType(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::Dequantize(), armnn::GetBiasDataType(), TensorInfo::IsTypeSpaceMatch(), armnn::MakeDecoder(), armnn::MakeEncoder(), MakeRandomTensor(), TfLiteParser::OutputShapeOfReshape(), QuantizationParametersAreEqual::QuantizationParametersAreEqual(), armnn::Quantize(), QuantizeData(), QuantizerVisitor::QuantizerVisitor(), SimpleConvolution2dTestImpl(), and SerializerVisitor::VisitQuantizedLstmLayer().
std::vector< float > GetQuantizationScales | ( | ) | const |
Definition at line 442 of file Tensor.cpp.
Referenced by armnn::GetBiasDataType(), armnnUtils::GetPerAxisParams(), and SerializerVisitor::VisitQuantizedLstmLayer().
|
inline |
Definition at line 187 of file Tensor.hpp.
Referenced by armnn::ArgMinMax(), armnn::BatchNormImpl(), armnn::BatchToSpaceNd(), BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnn::boost_test_print_type(), armnnTfParser::CalculatePaddedOutputTensorInfo(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), armnnTfLiteParser::ComputeWrappedIndex(), armnn::Concatenate(), Concatenate(), armnn::ConvertBf16ToFp32Weight(), armnnTfParser::ConvertTfTensorDataType(), armnn::optimizations::ConvertWeight(), armnn::ConvertWeightTensorFromArmnnToAcl(), armnn::CreateAclNormalizationLayerInfoForL2Normalization(), TfLiteParser::CreateNetworkFromBinary(), OnnxParser::CreateNetworkFromString(), armnn::CreateQuantizedConst(), ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), armnn::Debug(), armnn::DepthToSpace(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::DetectionPostProcess(), RefLstmWorkload::Execute(), RefQLstmWorkload::Execute(), RefElementwiseUnaryWorkload::Execute(), RefLogicalBinaryWorkload::Execute(), RefLogicalUnaryWorkload::Execute(), RefComparisonWorkload::Execute(), RefElementwiseWorkload< Functor, ParentDescriptor, DebugString >::Execute(), BFloat16ToFloat32::Func(), Float16ToFloat32::Func(), Float32ToBFloat16::Func(), Float32ToFloat16::Func(), armnn::Gather(), GetBias(), armnn::GetBiasDataType(), armnnUtils::GetPerAxisParams(), Deserializer::GetQLstmDescriptor(), RefTensorHandle::GetShape(), SampleTensorHandle::GetShape(), ConstCpuTensorHandle::GetShape(), GetTensorShapeAsArray(), armnn::GetUnpaddedTensorStrides(), armnn::InstanceNorm(), armnn::IsFloorSupported(), ClLayerSupport::IsResizeBilinearSupported(), NeonLayerSupport::IsResizeBilinearSupported(), ClLayerSupport::IsSplitterSupported(), NeonLayerSupport::IsSplitterSupported(), armnn::LogSoftmax(), main(), MakeTensor(), armnn::Mean(), armnnTfParser::OutputShapeOfExpandDims(), Deserializer::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), armnnTfParser::OutputShapeOfSqueeze(), armnn::Pad(), CaffeParserBase::ParseBatchNormLayer(), CaffeParserBase::ParseConcatLayer(), CaffeParserBase::ParseInnerProductLayer(), CaffeParserBase::ParsePoolingLayer(), CaffeParserBase::ParseScaleLayer(), armnnUtils::Permuted(), PermuteInputsForConcat(), armnn::PermuteTensor(), PermuteTensorNchwToNhwc(), PermuteTensorNhwcToNchw(), armnn::Pooling2d(), RefDepthwiseConvolution2dWorkload::PostAllocationConfigure(), RefConvolution2dWorkload::PostAllocationConfigure(), RefFullyConnectedWorkload::PostAllocationConfigure(), RefTransposeConvolution2dWorkload::PostAllocationConfigure(), armnn::PreluImpl(), armnnUtils::ProcessConcatInputTensorInfo(), RefConvolution2dWorkload::RefConvolution2dWorkload(), RefDepthwiseConvolution2dWorkload::RefDepthwiseConvolution2dWorkload(), RefFullyConnectedWorkload::RefFullyConnectedWorkload(), armnn::ReshapeWeightsForAcl(), armnn::Resize(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), AddBroadcastReshapeLayerImpl::Run(), DepthwiseConvolution2dLayer::SerializeLayerParameters(), Convolution2dLayer::SerializeLayerParameters(), Graph::SerializeToDot(), ShapesAreBroadcastCompatible::ShapesAreBroadcastCompatible(), ShapesAreSameRank::ShapesAreSameRank(), SimpleConvolution2dTestImpl(), armnn::Slice(), armnn::Softmax(), armnn::SpaceToBatchNd(), armnn::SpaceToDepth(), armnn::Split(), armnn::Splitter(), armnn::Stack(), armnn::StridedSlice(), armnnCaffeParser::TensorDescToBlobShape(), TfParser::TfParser(), TransposeConvolution2dEndToEnd(), armnnUtils::TransposeTensorShape(), ArgMinMaxQueueDescriptor::Validate(), PermuteQueueDescriptor::Validate(), DepthwiseConvolution2dQueueDescriptor::Validate(), DetectionPostProcessQueueDescriptor::Validate(), ResizeBilinearQueueDescriptor::Validate(), ResizeQueueDescriptor::Validate(), SpaceToBatchNdQueueDescriptor::Validate(), SpaceToDepthQueueDescriptor::Validate(), TransposeQueueDescriptor::Validate(), SliceQueueDescriptor::Validate(), DepthToSpaceQueueDescriptor::Validate(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), ConstantLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), QLstmLayer::ValidateTensorShapesFromInputs(), armnn::VerifyTensorInfoDataType(), and SerializerVisitor::VisitQuantizedLstmLayer().
|
inline |
Definition at line 188 of file Tensor.hpp.
|
inline |
Definition at line 197 of file Tensor.hpp.
References TensorShape::operator=(), TensorShape::operator==(), SetQuantizationOffset(), and SetQuantizationScale().
Referenced by armnn::GetBiasDataType(), TensorInfo::GetQuantizationScale(), TensorInfo::HasPerAxisQuantization(), and TensorInfo::IsTypeSpaceMatch().
bool HasPerAxisQuantization | ( | ) | const |
Definition at line 437 of file Tensor.cpp.
References TensorInfo::HasMultipleQuantizationScales().
Referenced by armnn::GetBiasDataType(), armnnUtils::GetPerAxisParams(), armnn::MakeDecoder(), armnn::MakeEncoder(), armnnUtils::Permuted(), TypeNotPerAxisQuantized::TypeNotPerAxisQuantized(), and SerializerVisitor::VisitQuantizedLstmLayer().
bool IsQuantized | ( | ) | const |
Definition at line 495 of file Tensor.cpp.
References armnn::IsQuantizedType().
Referenced by armnn::GetBiasDataType(), TensorInfo::IsTypeSpaceMatch(), and TypeNotPerAxisQuantized::TypeNotPerAxisQuantized().
bool IsTypeSpaceMatch | ( | const TensorInfo & | other | ) | const |
Check that the types are the same and, if quantize, that the quantization parameters are the same.
Definition at line 423 of file Tensor.cpp.
References TensorInfo::GetQuantizationOffset(), TensorInfo::GetQuantizationScale(), TensorInfo::HasMultipleQuantizationScales(), and TensorInfo::IsQuantized().
Referenced by ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), armnn::GetBiasDataType(), ClLayerSupport::IsConcatSupported(), NeonLayerSupport::IsConcatSupported(), ClLayerSupport::IsSplitterSupported(), and NeonLayerSupport::IsSplitterSupported().
bool operator!= | ( | const TensorInfo & | other | ) | const |
Definition at line 413 of file Tensor.cpp.
TensorInfo & operator= | ( | const TensorInfo & | other | ) |
Definition at line 398 of file Tensor.cpp.
bool operator== | ( | const TensorInfo & | other | ) | const |
Definition at line 406 of file Tensor.cpp.
|
inline |
Definition at line 195 of file Tensor.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), ConvertToDataType(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnnTfParser::OutputShapeOfExpandDims(), and ConvertFp32NetworkToFp16Impl::Run().
void SetQuantizationDim | ( | const Optional< unsigned int > & | quantizationDim | ) |
Definition at line 490 of file Tensor.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnnUtils::Permuted(), and TensorInfo::TensorInfo().
void SetQuantizationOffset | ( | int32_t | offset | ) |
Definition at line 480 of file Tensor.cpp.
Referenced by AdditionBroadcast1ElementTestImpl(), AdditionBroadcastTestImpl(), ArgMaxChannelTest(), ArgMaxHeightTest(), ArgMaxSimpleTest(), ArgMinChannelTest(), ArgMinSimpleTest(), ArgMinWidthTest(), BOOST_AUTO_TEST_CASE(), armnn::CheckScaleSetOnQuantizedType(), CompareActivationTestImpl(), ConstantLinearActivationTestCommon(), Convolution2d3x3DilationTestCommon(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), DetectionPostProcessFastNmsQuantizedTest(), DetectionPostProcessRegularNmsQuantizedTest(), FullyConnectedLargeTestCommon(), GetSoftmaxProfilerJson(), PermuteValueSet1Test(), PermuteValueSet2Test(), PermuteValueSet3Test(), QuantizeData(), SimpleConvolution2dTestImpl(), SimplePermuteTest(), SimpleTransposeTest(), TensorInfo::TensorInfo(), TransposeValueSet1Test(), TransposeValueSet2Test(), and TransposeValueSet3Test().
void SetQuantizationScale | ( | float | scale | ) |
Definition at line 464 of file Tensor.cpp.
Referenced by AdditionBroadcast1ElementTestImpl(), AdditionBroadcastTestImpl(), ArgMaxChannelTest(), ArgMaxHeightTest(), ArgMaxSimpleTest(), ArgMinChannelTest(), ArgMinSimpleTest(), ArgMinWidthTest(), BOOST_AUTO_TEST_CASE(), BoundedReLuTestCommon(), armnn::CheckScaleSetOnQuantizedType(), CompareActivationTestImpl(), ConcatUint16Test(), ConcatUint8Test(), ConstantLinearActivationTestCommon(), Convolution1dTestImpl(), Convolution2d3x3DilationTestCommon(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), DetectionPostProcessFastNmsQuantizedTest(), DetectionPostProcessRegularNmsQuantizedTest(), ElementwiseTestHelper(), ElementwiseUnaryTestHelper(), FullyConnectedLargeTestCommon(), FullyConnectedTest(), GetSoftmaxProfilerJson(), PermuteValueSet1Test(), PermuteValueSet2Test(), PermuteValueSet3Test(), PreluTest(), QuantizeData(), Reshape5dTest(), ReshapeBooleanTest(), armnn::SetupQuantize(), SimpleActivationTest(), SimpleConvolution2dTestImpl(), SimpleFloorTest(), SimplePermuteTest(), SimpleReshapeTest(), SimpleTransposeTest(), TensorInfo::TensorInfo(), TransposeValueSet1Test(), TransposeValueSet2Test(), and TransposeValueSet3Test().
void SetQuantizationScales | ( | const std::vector< float > & | scales | ) |
Definition at line 447 of file Tensor.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and TensorInfo::TensorInfo().
|
inline |
Definition at line 189 of file Tensor.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnnTfParser::CalculatePaddedOutputTensorInfo(), TfLiteParser::CreateNetworkFromBinary(), OnnxParser::CreateNetworkFromString(), armnnTfParser::OutputShapeOfExpandDims(), Deserializer::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), armnnTfParser::OutputShapeOfSqueeze(), CaffeParserBase::ParseInputLayer(), armnnUtils::Permuted(), PermuteInputsForConcat(), armnn::ReshapeWeightsForAcl(), AddBroadcastReshapeLayerImpl::Run(), TfParser::TfParser(), and armnnUtils::TransposeTensorShape().