21.05
|
#include <boost/test/unit_test.hpp>
#include <armnn/Tensor.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
Go to the source code of this file.
Namespaces | |
armnn | |
Copyright (c) 2021 ARM Limited and Contributors. | |
Functions | |
std::ostream & | boost_test_print_type (std::ostream &ostr, const TensorInfo &right) |
std::ostream & | boost_test_print_type (std::ostream &ostr, const TensorShape &shape) |
BOOST_FIXTURE_TEST_CASE (ConstructShapeUsingListInitialization, TensorInfoFixture) | |
BOOST_FIXTURE_TEST_CASE (ConstructTensorInfo, TensorInfoFixture) | |
BOOST_FIXTURE_TEST_CASE (CopyConstructTensorInfo, TensorInfoFixture) | |
BOOST_FIXTURE_TEST_CASE (TensorInfoEquality, TensorInfoFixture) | |
BOOST_FIXTURE_TEST_CASE (TensorInfoInequality, TensorInfoFixture) | |
BOOST_FIXTURE_TEST_CASE (TensorInfoAssignmentOperator, TensorInfoFixture) | |
BOOST_AUTO_TEST_CASE (CopyNoQuantizationTensorInfo) | |
BOOST_AUTO_TEST_CASE (CopyDifferentQuantizationTensorInfo) | |
void | CheckTensor (const ConstTensor &t) |
BOOST_AUTO_TEST_CASE (TensorVsConstTensor) | |
BOOST_AUTO_TEST_CASE (ModifyTensorInfo) | |
BOOST_AUTO_TEST_CASE (TensorShapeOperatorBrackets) | |
BOOST_AUTO_TEST_CASE (TensorInfoPerAxisQuantization) | |
BOOST_AUTO_TEST_CASE (TensorShape_scalar) | |
BOOST_AUTO_TEST_CASE (TensorShape_DynamicTensorType1_unknownNumberDimensions) | |
BOOST_AUTO_TEST_CASE (TensorShape_DynamicTensorType1_unknownAllDimensionsSizes) | |
BOOST_AUTO_TEST_CASE (TensorShape_DynamicTensorType1_unknownSomeDimensionsSizes) | |
BOOST_AUTO_TEST_CASE (TensorShape_DynamicTensorType1_transitionFromUnknownToKnownDimensionsSizes) | |
BOOST_AUTO_TEST_CASE (Tensor_emptyConstructors) | |
BOOST_AUTO_TEST_CASE | ( | CopyNoQuantizationTensorInfo | ) |
Definition at line 102 of file TensorTest.cpp.
References TensorInfo::GetDataType(), TensorInfo::GetQuantizationDim(), TensorInfo::GetQuantizationOffset(), TensorInfo::GetQuantizationScale(), TensorInfo::GetShape(), OptionalBase::has_value(), armnn::QAsymmU8, TensorInfo::SetDataType(), TensorInfo::SetQuantizationDim(), TensorInfo::SetQuantizationOffset(), TensorInfo::SetQuantizationScale(), TensorInfo::SetShape(), and OptionalReferenceSwitch< IsReference, T >::value().
BOOST_AUTO_TEST_CASE | ( | CopyDifferentQuantizationTensorInfo | ) |
Definition at line 132 of file TensorTest.cpp.
References TensorInfo::GetDataType(), TensorInfo::GetQuantizationDim(), TensorInfo::GetQuantizationOffset(), TensorInfo::GetQuantizationScale(), TensorInfo::GetShape(), armnn::QAsymmU8, TensorInfo::SetDataType(), TensorInfo::SetQuantizationDim(), TensorInfo::SetQuantizationOffset(), TensorInfo::SetQuantizationScale(), TensorInfo::SetShape(), and OptionalReferenceSwitch< IsReference, T >::value().
BOOST_AUTO_TEST_CASE | ( | TensorVsConstTensor | ) |
Definition at line 170 of file TensorTest.cpp.
References CheckTensor().
BOOST_AUTO_TEST_CASE | ( | ModifyTensorInfo | ) |
Definition at line 188 of file TensorTest.cpp.
References TensorInfo::GetDataType(), TensorInfo::GetQuantizationOffset(), TensorInfo::GetQuantizationScale(), TensorInfo::GetShape(), armnn::info, armnn::QAsymmU8, TensorInfo::SetDataType(), TensorInfo::SetQuantizationOffset(), TensorInfo::SetQuantizationScale(), and TensorInfo::SetShape().
BOOST_AUTO_TEST_CASE | ( | TensorShapeOperatorBrackets | ) |
Definition at line 201 of file TensorTest.cpp.
BOOST_AUTO_TEST_CASE | ( | TensorInfoPerAxisQuantization | ) |
Definition at line 215 of file TensorTest.cpp.
References armnn::Float32, and TensorInfo::SetQuantizationScales().
BOOST_AUTO_TEST_CASE | ( | TensorShape_scalar | ) |
Definition at line 249 of file TensorTest.cpp.
References TensorShape::AreAllDimensionsSpecified(), armnn::Float32, TensorShape::GetDimensionality(), TensorShape::GetDimensionSpecificity(), BaseTensor< MemoryType >::GetInfo(), BaseTensor< MemoryType >::GetMemoryArea(), TensorShape::GetNumDimensions(), TensorShape::GetNumElements(), TensorInfo::GetShape(), BaseTensor< MemoryType >::GetShape(), armnn::info, TensorShape::IsAtLeastOneDimensionSpecified(), and armnn::Scalar.
BOOST_AUTO_TEST_CASE | ( | TensorShape_DynamicTensorType1_unknownNumberDimensions | ) |
Definition at line 283 of file TensorTest.cpp.
References armnn::Float32, TensorShape::GetDimensionality(), TensorShape::GetNumDimensions(), TensorShape::GetNumElements(), armnn::info, and armnn::NotSpecified.
BOOST_AUTO_TEST_CASE | ( | TensorShape_DynamicTensorType1_unknownAllDimensionsSizes | ) |
Definition at line 303 of file TensorTest.cpp.
References TensorShape::AreAllDimensionsSpecified(), armnn::Float32, TensorShape::GetDimensionality(), TensorShape::GetDimensionSpecificity(), TensorShape::GetNumDimensions(), TensorShape::GetNumElements(), armnn::info, TensorShape::IsAtLeastOneDimensionSpecified(), and armnn::Specified.
BOOST_AUTO_TEST_CASE | ( | TensorShape_DynamicTensorType1_unknownSomeDimensionsSizes | ) |
Definition at line 327 of file TensorTest.cpp.
References armnn::Float32, BaseTensor< MemoryType >::GetInfo(), TensorInfo::GetShape(), BaseTensor< MemoryType >::GetShape(), armnn::info, and armnn::Specified.
BOOST_AUTO_TEST_CASE | ( | TensorShape_DynamicTensorType1_transitionFromUnknownToKnownDimensionsSizes | ) |
Definition at line 365 of file TensorTest.cpp.
References TensorShape::AreAllDimensionsSpecified(), armnn::Float32, TensorShape::GetDimensionality(), TensorShape::GetDimensionSpecificity(), BaseTensor< MemoryType >::GetInfo(), TensorShape::GetNumDimensions(), TensorShape::GetNumElements(), TensorInfo::GetShape(), BaseTensor< MemoryType >::GetShape(), armnn::info, TensorShape::IsAtLeastOneDimensionSpecified(), armnn::NotSpecified, TensorShape::SetDimensionSize(), TensorShape::SetNumDimensions(), TensorInfo::SetShape(), and armnn::Specified.
BOOST_AUTO_TEST_CASE | ( | Tensor_emptyConstructors | ) |
Definition at line 426 of file TensorTest.cpp.
References BOOST_AUTO_TEST_SUITE_END(), and armnn::Specified.
BOOST_FIXTURE_TEST_CASE | ( | ConstructShapeUsingListInitialization | , |
TensorInfoFixture | |||
) |
Definition at line 55 of file TensorTest.cpp.
BOOST_FIXTURE_TEST_CASE | ( | ConstructTensorInfo | , |
TensorInfoFixture | |||
) |
Definition at line 61 of file TensorTest.cpp.
BOOST_FIXTURE_TEST_CASE | ( | CopyConstructTensorInfo | , |
TensorInfoFixture | |||
) |
Definition at line 70 of file TensorTest.cpp.
BOOST_FIXTURE_TEST_CASE | ( | TensorInfoEquality | , |
TensorInfoFixture | |||
) |
Definition at line 80 of file TensorTest.cpp.
BOOST_FIXTURE_TEST_CASE | ( | TensorInfoInequality | , |
TensorInfoFixture | |||
) |
BOOST_FIXTURE_TEST_CASE | ( | TensorInfoAssignmentOperator | , |
TensorInfoFixture | |||
) |
Definition at line 95 of file TensorTest.cpp.
void CheckTensor | ( | const ConstTensor & | t | ) |
Definition at line 165 of file TensorTest.cpp.
References BaseTensor< MemoryType >::GetInfo().
Referenced by BOOST_AUTO_TEST_CASE().