21.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, bool isConstant=false) | |
TensorInfo (unsigned int numDimensions, const unsigned int *dimensionSizes, DataType dataType, float quantizationScale=0.0f, int32_t quantizationOffset=0, bool isConstant=false) | |
TensorInfo (const TensorShape &shape, DataType dataType, const std::vector< float > &quantizationScales, unsigned int quantizationDim, bool isConstant=false) | |
TensorInfo (unsigned int numDimensions, const unsigned int *dimensionSizes, DataType dataType, const std::vector< float > &quantizationScales, unsigned int quantizationDim, bool isConstant=false) | |
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 | IsConstant () const |
void | SetConstant (const bool IsConstant=true) |
Marks the data corresponding to this tensor info as constant. More... | |
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 , |
||
bool | isConstant = false |
||
) |
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 , |
||
bool | isConstant = false |
||
) |
Definition at line 359 of file Tensor.cpp.
References TensorInfo::SetQuantizationOffset(), and TensorInfo::SetQuantizationScale().
TensorInfo | ( | const TensorShape & | shape, |
DataType | dataType, | ||
const std::vector< float > & | quantizationScales, | ||
unsigned int | quantizationDim, | ||
bool | isConstant = false |
||
) |
Definition at line 373 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, | ||
bool | isConstant = false |
||
) |
Definition at line 386 of file Tensor.cpp.
References TensorInfo::SetQuantizationDim(), and TensorInfo::SetQuantizationScales().
TensorInfo | ( | const TensorInfo & | other | ) |
Definition at line 400 of file Tensor.cpp.
|
inline |
Definition at line 198 of file Tensor.hpp.
Referenced by BiasAndWeightsTypesCompatible::BiasAndWeightsTypesCompatible(), BiasAndWeightsTypesMatch::BiasAndWeightsTypesMatch(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), armnn::CheckScaleSetOnQuantizedType(), armnn::CheckTensorDataTypesEqual(), armnn::ClConvertFp16ToFp32WorkloadValidate(), armnn::ClConvertFp32ToFp16WorkloadValidate(), armnnTfLiteParser::ComputeWrappedIndex(), armnn::ConvertBf16ToFp32Weight(), armnn::optimizations::ConvertWeight(), RefDepthToSpaceWorkload::ExecuteAsync(), RefStridedSliceWorkload::ExecuteAsync(), RefArgMinMaxWorkload::ExecuteAsync(), RefSliceWorkload::ExecuteAsync(), RefShapeWorkload::ExecuteAsync(), BFloat16ToFloat32::Func(), Float16ToFloat32::Func(), Float32ToBFloat16::Func(), Float32ToFloat16::Func(), armnn::GetBiasDataType(), TfLiteParserImpl::GetBuffer(), Layer::GetDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), armnn::optimizations::pad_fold::GetLowestElement(), armnnUtils::GetPerAxisParams(), armnn::GetUnpaddedTensorStrides(), RefTensorHandle::Import(), armnn::InitializeArmComputeTensorData(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), SampleDynamicLayerSupport::IsAdditionSupported(), RefLayerSupport::IsConvertFp16ToFp32Supported(), RefLayerSupport::IsConvertFp32ToFp16Supported(), RefLayerSupport::IsConvolution2dSupported(), RefLayerSupport::IsConvolution3dSupported(), RefLayerSupport::IsDepthwiseConvolutionSupported(), NeonLayerSupport::IsFloorSupported(), armnn::IsFloorSupported(), RefLayerSupport::IsFullyConnectedSupported(), ClLayerSupport::IsQLstmSupported(), NeonLayerSupport::IsQLstmSupported(), RefLayerSupport::IsTransposeConvolution2dSupported(), TfLiteParserImpl::LoadModel(), armnn::LstmImpl(), main(), armnn::MakeDecoder(), armnn::MakeEncoder(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), armnn::PermuteTensor(), ConvertFp32NetworkToFp16Impl::Run(), TEST_SUITE(), TypeAnyOf::TypeAnyOf(), TypeIs::TypeIs(), ArgMinMaxQueueDescriptor::Validate(), FullyConnectedQueueDescriptor::Validate(), Convolution2dQueueDescriptor::Validate(), Convolution3dQueueDescriptor::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(), LayerVerifierBase::VerifyConstTensors(), LayerVerifierBase::VerifyNameAndConnections(), and armnn::VerifyTensorInfoDataType().
unsigned int GetNumBytes | ( | ) | const |
Definition at line 429 of file Tensor.cpp.
References armnn::GetDataTypeSize(), and TensorInfo::GetNumElements().
Referenced by RefTensorHandle::Allocate(), SampleTensorHandle::Allocate(), ScopedTensorHandle::Allocate(), ClDepthwiseConvolutionWorkload::ClDepthwiseConvolutionWorkload(), armnnTfLiteParser::ComputeWrappedIndex(), ConstTensor::ConstTensor(), armnnOnnxParser::CreateConstTensorImpl(), RefReshapeWorkload::ExecuteAsync(), IDeserializer::DeserializerImpl::GetNetworkOutputBindingInfo(), SampleTensorHandle::Import(), TfLiteParserImpl::LoadModel(), RefTensorHandle::Manage(), SampleTensorHandle::Manage(), RefTensorHandle::Map(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), armnn::PermuteTensor(), armnn::ReorderWeightChannelsForAcl(), and ScopedTensorHandle::ScopedTensorHandle().
|
inline |
Definition at line 195 of file Tensor.hpp.
Referenced by armnn::ArgMinMax(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), armnn::ComputeAclAxis(), armnn::ComputePositiveAxis(), armnn::ComputeReductionTensorShape(), armnn::ComputeSoftmaxAclAxis(), armnnTfLiteParser::ComputeWrappedIndex(), armnn::Concatenate(), armnn::Debug(), RefShapeWorkload::ExecuteAsync(), RefRankWorkload::ExecuteAsync(), armnn::Gather(), armnn::GetBiasDataType(), RefLayerSupport::IsBatchToSpaceNdSupported(), RefLayerSupport::IsMeanSupported(), armnn::LogSoftmax(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), RefFullyConnectedWorkload::PostAllocationConfigure(), armnnUtils::ProcessConcatInputTensorInfo(), armnn::Reduce(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), AddBroadcastReshapeLayerImpl::Run(), ParserFlatbuffersFixture::RunTest(), armnn::Softmax(), armnn::Split(), armnn::Splitter(), armnn::Stack(), TensorNumDimensionsAreCorrect::TensorNumDimensionsAreCorrect(), TEST_SUITE(), FullyConnectedQueueDescriptor::Validate(), MeanQueueDescriptor::Validate(), PadQueueDescriptor::Validate(), InstanceNormalizationQueueDescriptor::Validate(), L2NormalizationQueueDescriptor::Validate(), StridedSliceQueueDescriptor::Validate(), GatherQueueDescriptor::Validate(), SliceQueueDescriptor::Validate(), ReduceLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), and MeanLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 196 of file Tensor.hpp.
Referenced by armnn::Activation(), BoundedReLuUint8UpperAndLowerBoundTest(), CompareActivationTestImpl(), CompareAdditionTest(), CompareBatchNormTest(), CompareConvolution2dTestImpl(), CompareDepthwiseConvolution2dTestImpl(), CompareMultiplicationTest(), armnnTfLiteParser::ComputeWrappedIndex(), Concat2dTestImpl(), Concat3dTestImpl(), Concat4dTestImpl(), ConstantLinearActivationTestCommon(), armnn::ConvertBf16ToFp32Weight(), armnn::optimizations::ConvertWeight(), armnnOnnxParser::CreateConstTensorImpl(), armnn::Debug(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::Dequantize(), armnn::DetectionPostProcess(), SampleDynamicAdditionWorkload::Execute(), RefConvertBf16ToFp32Workload::ExecuteAsync(), RefConvertFp16ToFp32Workload::ExecuteAsync(), RefConvertFp32ToBf16Workload::ExecuteAsync(), RefConvertFp32ToFp16Workload::ExecuteAsync(), RefFakeQuantizationFloat32Workload::ExecuteAsync(), RefFloorWorkload::ExecuteAsync(), RefCastWorkload::ExecuteAsync(), RefUnidirectionalSequenceLstmWorkload::ExecuteAsync(), RefDebugWorkload< DataType >::ExecuteAsync(), BFloat16ToFloat32::Func(), Float16ToFloat32::Func(), Float32ToBFloat16::Func(), Float32ToFloat16::Func(), armnn::Gather(), armnn::GetBiasDataType(), TensorInfo::GetNumBytes(), L2Normalization2dShapeTest(), LayerTestResult< T, n >::LayerTestResult(), TfLiteParserImpl::LoadModel(), MakeRandomTensor(), armnn::MirrorPad(), MirrorPad2dTestCommon(), MirrorPad3dTestCommon(), MirrorPad4dTestCommon(), IDeserializer::DeserializerImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), armnn::Pad(), Pad2dTestCommon(), Pad3dTestCommon(), Pad4dTestCommon(), PadQAsymmTestCommon(), PermuteOutputForConcat(), PermuteTensorData(), armnn::Quantize(), QuantizeData(), RankTest(), armnn::Reduce(), ParserFlatbuffersFixture::RunTest(), ShapesAreSameTotalSize::ShapesAreSameTotalSize(), ShapeTest(), SimpleConvolution2dTestImpl(), SimpleFloorTest(), SimpleFullyConnectedTestImpl(), SimplePermuteTestImpl(), SimpleTransposeTestImpl(), armnn::Splitter(), armnn::Stack(), TEST_SUITE(), armnnDeserializer::ToConstTensor(), TransposeConvolution2dPerAxisQuantTest(), and SpaceToBatchNdQueueDescriptor::Validate().
Optional< unsigned int > GetQuantizationDim | ( | ) | const |
Definition at line 496 of file Tensor.cpp.
Referenced by armnn::GetBiasDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), armnnUtils::GetPerAxisParams(), and armnnUtils::Permuted().
int32_t GetQuantizationOffset | ( | ) | const |
Definition at line 480 of file Tensor.cpp.
Referenced by armnn::CheckScaleSetOnQuantizedType(), Convolution2d3x3DilationTestCommon(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::Dequantize(), armnn::GetBiasDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), armnn::optimizations::pad_fold::GetLowestElement(), armnn::optimizations::pad_fold::GetZeroElement(), TensorInfo::IsTypeSpaceMatch(), armnn::MakeDecoder(), armnn::MakeEncoder(), MakeRandomTensor(), TfLiteParserImpl::OutputShapeOfReshape(), QuantizationParametersAreEqual::QuantizationParametersAreEqual(), armnn::Quantize(), QuantizeData(), SimpleConvolution2dTestImpl(), TEST_SUITE(), and LayerVerifierBase::VerifyNameAndConnections().
float GetQuantizationScale | ( | ) | const |
Definition at line 463 of file Tensor.cpp.
References ARMNN_ASSERT, and TensorInfo::HasMultipleQuantizationScales().
Referenced by armnn::CheckScaleSetOnQuantizedType(), Convolution2d3x3DilationTestCommon(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::Dequantize(), armnn::GetBiasDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), armnn::optimizations::pad_fold::GetLowestElement(), TensorInfo::IsTypeSpaceMatch(), armnn::MakeDecoder(), armnn::MakeEncoder(), MakeRandomTensor(), TfLiteParserImpl::OutputShapeOfReshape(), QuantizationParametersAreEqual::QuantizationParametersAreEqual(), armnn::Quantize(), QuantizeData(), SimpleConvolution2dTestImpl(), TEST_SUITE(), and LayerVerifierBase::VerifyNameAndConnections().
std::vector< float > GetQuantizationScales | ( | ) | const |
Definition at line 453 of file Tensor.cpp.
Referenced by armnn::GetBiasDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), and armnnUtils::GetPerAxisParams().
|
inline |
Definition at line 191 of file Tensor.hpp.
Referenced by armnn::ArgMinMax(), armnn::BatchNormImpl(), armnn::BatchToSpaceNd(), armnnUtils::CalculateReducedOutputTensoInfo(), armnnUtils::CalculateStridedSliceOutputTensorInfo(), CompareActivationTestImpl(), CompareAdditionTest(), CompareBatchNormTest(), CompareConvolution2dTestImpl(), CompareDepthwiseConvolution2dTestImpl(), CompareMultiplicationTest(), armnnTfLiteParser::ComputeWrappedIndex(), armnn::Concatenate(), Concatenate(), ConstantLinearActivationTestCommon(), armnn::Convert1HWOTensorInfoToAcl(), armnn::Convert1HWOTensorToAcl(), armnn::Convert1HWOtoMIHW(), armnn::ConvertBf16ToFp32Weight(), armnn::ConvertWeightTensorFromArmnnToAcl(), Convolution2d3x3DilationTestCommon(), armnn::CreateAclNormalizationLayerInfoForL2Normalization(), armnnOnnxParser::CreateConstTensorImpl(), OnnxParserImpl::CreateNetworkFromString(), ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), armnn::Debug(), armnn::DepthToSpace(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), armnn::DetectionPostProcess(), RefChannelShuffleWorkload::ExecuteAsync(), RefDepthwiseConvolution2dWorkload::ExecuteAsync(), RefLstmWorkload::ExecuteAsync(), RefQLstmWorkload::ExecuteAsync(), RefElementwiseUnaryWorkload::ExecuteAsync(), RefLogicalUnaryWorkload::ExecuteAsync(), RefLogicalBinaryWorkload::ExecuteAsync(), RefComparisonWorkload::ExecuteAsync(), RefConvolution2dWorkload::ExecuteAsync(), RefShapeWorkload::ExecuteAsync(), RefConvolution3dWorkload::ExecuteAsync(), RefUnidirectionalSequenceLstmWorkload::ExecuteAsync(), RefElementwiseWorkload< Functor, ParentDescriptor, DebugString >::ExecuteAsync(), BFloat16ToFloat32::Func(), Float16ToFloat32::Func(), Float32ToBFloat16::Func(), Float32ToFloat16::Func(), armnn::Gather(), GetBias(), GetBiasData(), armnn::GetBiasDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), armnnUtils::GetPerAxisParams(), IDeserializer::DeserializerImpl::GetQLstmDescriptor(), RefTensorHandle::GetShape(), SampleTensorHandle::GetShape(), ConstTensorHandle::GetShape(), armnn::GetUnpaddedTensorStrides(), armnn::InstanceNorm(), armnn::IsFloorSupported(), ClLayerSupport::IsSplitterSupported(), NeonLayerSupport::IsSplitterSupported(), L2Normalization2dShapeTest(), LayerTestResult< T, n >::LayerTestResult(), TfLiteParserImpl::LoadModel(), armnn::LogSoftmax(), armnn::LstmImpl(), main(), armnn::MirrorPad(), MirrorPad2dTestCommon(), MirrorPad3dTestCommon(), MirrorPad4dTestCommon(), IDeserializer::DeserializerImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), armnn::Pad(), Pad2dTestCommon(), Pad3dTestCommon(), Pad4dTestCommon(), PadQAsymmTestCommon(), armnnUtils::Permuted(), PermuteInputsForConcat(), armnn::PermuteTensor(), PermuteTensorNcdhwToNdhwc(), PermuteTensorNchwToNhwc(), PermuteTensorNdhwcToNcdhw(), PermuteTensorNhwcToNchw(), armnn::Pooling2d(), RefConvolution3dWorkload::PostAllocationConfigure(), RefFullyConnectedWorkload::PostAllocationConfigure(), armnn::PreluImpl(), armnnUtils::ProcessConcatInputTensorInfo(), RankTest(), armnn::Reduce(), RefConvolution2dWorkload::RefConvolution2dWorkload(), RefDepthwiseConvolution2dWorkload::RefDepthwiseConvolution2dWorkload(), armnn::ReshapeWeightsForAcl(), armnn::Resize(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), AddBroadcastReshapeLayerImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), Convolution3dLayer::SerializeLayerParameters(), DepthwiseConvolution2dLayer::SerializeLayerParameters(), Convolution2dLayer::SerializeLayerParameters(), Graph::SerializeToDot(), ShapesAreBroadcastCompatible::ShapesAreBroadcastCompatible(), ShapesAreSameRank::ShapesAreSameRank(), ShapeTest(), SimpleConvolution2dTestImpl(), SimpleFloorTest(), SimplePermuteTestImpl(), SimpleTransposeTestImpl(), armnn::Slice(), armnn::Softmax(), armnn::SpaceToBatchNd(), armnn::SpaceToDepth(), armnn::Split(), armnn::Splitter(), armnn::Stack(), armnn::StridedSlice(), TEST_SUITE(), TransposeConvolution2dEndToEnd(), TransposeConvolution2dPerAxisQuantTest(), armnnUtils::TransposeTensorShape(), ArgMinMaxQueueDescriptor::Validate(), PermuteQueueDescriptor::Validate(), Pooling2dQueueDescriptor::Validate(), DepthwiseConvolution2dQueueDescriptor::Validate(), DetectionPostProcessQueueDescriptor::Validate(), ResizeQueueDescriptor::Validate(), SpaceToBatchNdQueueDescriptor::Validate(), SpaceToDepthQueueDescriptor::Validate(), TransposeQueueDescriptor::Validate(), SliceQueueDescriptor::Validate(), DepthToSpaceQueueDescriptor::Validate(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), ChannelShuffleLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ConstantLayer::ValidateTensorShapesFromInputs(), Convolution3dLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), QLstmLayer::ValidateTensorShapesFromInputs(), LayerVerifierBase::VerifyConstTensors(), LayerVerifierBase::VerifyNameAndConnections(), and armnn::VerifyTensorInfoDataType().
|
inline |
Definition at line 192 of file Tensor.hpp.
|
inline |
Definition at line 201 of file Tensor.hpp.
References TensorShape::operator=(), and TensorShape::operator==().
Referenced by armnn::GetBiasDataType(), TensorInfo::GetQuantizationScale(), TensorInfo::HasPerAxisQuantization(), and TensorInfo::IsTypeSpaceMatch().
bool HasPerAxisQuantization | ( | ) | const |
Definition at line 448 of file Tensor.cpp.
References TensorInfo::HasMultipleQuantizationScales().
Referenced by armnn::Convert1HWOtoMIHW(), armnn::GetBiasDataType(), armnnSerializer::GetFlatBufferArgMinMaxFunction(), armnnUtils::GetPerAxisParams(), armnn::MakeDecoder(), armnn::MakeEncoder(), and TypeNotPerAxisQuantized::TypeNotPerAxisQuantized().
bool IsConstant | ( | ) | const |
Definition at line 511 of file Tensor.cpp.
Referenced by LayerSupportHandle::IsFullyConnectedSupported(), and TensorInfo::SetConstant().
bool IsQuantized | ( | ) | const |
Definition at line 506 of file Tensor.cpp.
References armnn::IsQuantizedType().
Referenced by RefCastWorkload::ExecuteAsync(), armnn::GetBiasDataType(), armnn::optimizations::pad_fold::GetZeroElement(), 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 434 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 424 of file Tensor.cpp.
TensorInfo & operator= | ( | const TensorInfo & | other | ) |
Definition at line 407 of file Tensor.cpp.
bool operator== | ( | const TensorInfo & | other | ) | const |
Definition at line 416 of file Tensor.cpp.
void SetConstant | ( | const bool | IsConstant = true | ) |
Marks the data corresponding to this tensor info as constant.
: This can allow further optimization on execution : The user has to ensure that the underlying data actually is constant.
Definition at line 516 of file Tensor.cpp.
References TensorInfo::IsConstant().
Referenced by armnn::experimental::AsyncEndToEndTestImpl(), armnn::experimental::AsyncThreadedEndToEndTestImpl(), armnnOnnxParser::CreateConstTensorImpl(), OnnxParserImpl::CreateNetworkFromString(), CreateTestNetwork(), TfLiteParserImpl::GetBuffer(), GetSoftmaxProfilerJson(), armnnUtils::MakeInputTensors(), armnn::PermuteTensor(), QuantizedLstmEndToEnd(), TEST_SUITE(), armnnDeserializer::ToConstTensor(), and VerifyPostOptimisationStructureTestImpl().
|
inline |
Definition at line 199 of file Tensor.hpp.
Referenced by ConvertToDataType(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), and ConvertFp32NetworkToFp16Impl::Run().
void SetQuantizationDim | ( | const Optional< unsigned int > & | quantizationDim | ) |
Definition at line 501 of file Tensor.cpp.
Referenced by armnnUtils::Permuted(), and TensorInfo::TensorInfo().
void SetQuantizationOffset | ( | int32_t | offset | ) |
Definition at line 491 of file Tensor.cpp.
Referenced by AdditionBroadcast1ElementTestImpl(), AdditionBroadcastTestImpl(), ArgMaxChannelTest(), ArgMaxHeightTest(), ArgMaxSimpleTest(), ArgMinChannelTest(), ArgMinSimpleTest(), ArgMinWidthTest(), armnn::CheckScaleSetOnQuantizedType(), CompareActivationTestImpl(), ConstantLinearActivationTestCommon(), Convolution2d3x3DilationTestCommon(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), DetectionPostProcessFastNmsQuantizedTest(), DetectionPostProcessRegularNmsQuantizedTest(), RefCastWorkload::ExecuteAsync(), FullyConnectedLargeTestCommon(), GetSoftmaxProfilerJson(), PermuteValueSet1Test(), PermuteValueSet2Test(), PermuteValueSet3Test(), ReduceMaxNegativeAxisTest(), ReduceMaxSimpleTest(), ReduceMaxSimpleTest2(), ReduceMinNegativeAxisTest(), ReduceMinSimpleTest(), ReduceProdMultipleAxisTest(), ReduceProdSimpleTest(), ReduceProdSingleAxisTest1(), ReduceProdSingleAxisTest2(), ReduceProdSingleAxisTest3(), ReduceSumMultipleAxisTest(), ReduceSumSimpleTest(), ReduceSumSingleAxisTest1(), ReduceSumSingleAxisTest2(), ReduceSumSingleAxisTest3(), SimpleConvolution2dTestImpl(), SimplePermuteTest(), SimpleTransposeTest(), TensorInfo::TensorInfo(), TEST_SUITE(), TransposeValueSet1Test(), TransposeValueSet2Test(), and TransposeValueSet3Test().
void SetQuantizationScale | ( | float | scale | ) |
Definition at line 475 of file Tensor.cpp.
Referenced by AdditionBroadcast1ElementTestImpl(), AdditionBroadcastTestImpl(), ArgMaxChannelTest(), ArgMaxHeightTest(), ArgMaxSimpleTest(), ArgMinChannelTest(), ArgMinSimpleTest(), ArgMinWidthTest(), BoundedReLuTestCommon(), CastTest(), ChannelShuffle2DTest(), ChannelShuffle4DTest(), armnn::CheckScaleSetOnQuantizedType(), CompareActivationTestImpl(), ConcatDifferentInputOutputQParamTest(), ConcatUint16Test(), ConcatUint8DifferentQParamsTest(), ConcatUint8Test(), ConstantLinearActivationTestCommon(), Convolution1dTestImpl(), Convolution2d3x3DilationTestCommon(), DepthwiseConvolution2d3x3DilationTestCommon(), DepthwiseConvolution2dAsymmetricTestImpl(), DepthwiseConvolution2dDepthMul1TestImpl(), DepthwiseConvolution2dTestImpl(), DetectionPostProcessFastNmsQuantizedTest(), DetectionPostProcessRegularNmsQuantizedTest(), ElementwiseTestHelper(), ElementwiseUnaryTestHelper(), RefCastWorkload::ExecuteAsync(), FullyConnectedLargeTestCommon(), FullyConnectedTest(), GetSoftmaxProfilerJson(), PermuteValueSet1Test(), PermuteValueSet2Test(), PermuteValueSet3Test(), PreluTest(), ReduceMaxNegativeAxisTest(), ReduceMaxSimpleTest(), ReduceMaxSimpleTest2(), ReduceMinNegativeAxisTest(), ReduceMinSimpleTest(), ReduceProdMultipleAxisTest(), ReduceProdSimpleTest(), ReduceProdSingleAxisTest1(), ReduceProdSingleAxisTest2(), ReduceProdSingleAxisTest3(), ReduceSumMultipleAxisTest(), ReduceSumSimpleTest(), ReduceSumSingleAxisTest1(), ReduceSumSingleAxisTest2(), ReduceSumSingleAxisTest3(), Reshape5dTest(), ReshapeBooleanTest(), SimpleActivationTest(), SimpleChannelShuffleTest(), SimpleConvolution2dTestImpl(), SimpleFloorTest(), SimplePermuteTest(), SimpleReshapeTest(), SimpleTransposeTest(), TensorInfo::TensorInfo(), TEST_SUITE(), TransposeValueSet1Test(), TransposeValueSet2Test(), and TransposeValueSet3Test().
void SetQuantizationScales | ( | const std::vector< float > & | scales | ) |
Definition at line 458 of file Tensor.cpp.
Referenced by TensorInfo::TensorInfo().
|
inline |
Definition at line 193 of file Tensor.hpp.
Referenced by armnn::Convert1HWOtoMIHW(), OnnxParserImpl::CreateNetworkFromString(), RefUnidirectionalSequenceLstmWorkload::ExecuteAsync(), IDeserializer::DeserializerImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfReshape(), TfLiteParserImpl::OutputShapeOfSqueeze(), armnnUtils::Permuted(), PermuteInputsForConcat(), armnn::ReshapeWeightsForAcl(), AddBroadcastReshapeLayerImpl::Run(), and armnnUtils::TransposeTensorShape().