20.02
|
#include "TestUtils.hpp"
#include <BackendSettings.hpp>
#include <Graph.hpp>
#include <Network.hpp>
#include <Optimizer.hpp>
#include <armnn/BackendRegistry.hpp>
#include <armnn/INetwork.hpp>
#include <armnn/LayerVisitorBase.hpp>
#include <armnnUtils/FloatingPointConverter.hpp>
#include <backendsCommon/CpuTensorHandle.hpp>
#include <backendsCommon/IBackendInternal.hpp>
#include <backendsCommon/LayerSupportBase.hpp>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
Functions | |
BOOST_AUTO_TEST_CASE (LSTMValidateTensorShapesFromInputsCIFGDisabledTest) | |
BOOST_AUTO_TEST_CASE (LSTMValidateTensorShapesFromInputsCIFGEnabledTest) | |
BOOST_AUTO_TEST_CASE (InsertConvertersTest) | |
void | CreateConvolution2dGraph (Graph &graph, const unsigned int *inputShape, const unsigned int *weightsShape, const unsigned int *outputShape, DataLayout dataLayout=DataLayout::NCHW) |
BOOST_AUTO_TEST_CASE (Conv2dValidateTensorShapesFromInputs) | |
BOOST_AUTO_TEST_CASE (Conv2dValidateTensorShapesFromInputsNhwc) | |
void | CreateDepthwiseConvolution2dGraph (Graph &graph, const unsigned int *inputShape, const unsigned int *weightsShape, const unsigned int *outputShape, DataLayout dataLayout=DataLayout::NCHW) |
BOOST_AUTO_TEST_CASE (DepthwiseConv2dValidateTensorShapesFromInputs) | |
BOOST_AUTO_TEST_CASE (DepthwiseConv2dValidateTensorShapesFromInputsNhwc) | |
void | CreatePooling2dGraph (Graph &graph, const unsigned int *inputShape, const unsigned int *outputShape, DataLayout dataLayout=DataLayout::NCHW) |
BOOST_AUTO_TEST_CASE (Pooling2dValidateTensorShapesFromInputs) | |
BOOST_AUTO_TEST_CASE (Pooling2dValidateTensorShapesFromInputsNhwc) | |
void | CreateResizeBilinearGraph (Graph &graph, const unsigned int *inputShape, const unsigned int *outputShape, DataLayout dataLayout=DataLayout::NCHW) |
BOOST_AUTO_TEST_CASE (ResizeBilinearValidateTensorShapesFromInputs) | |
BOOST_AUTO_TEST_CASE (ResizeBilinearValidateTensorShapesFromInputsNhwc) | |
void | CreateGatherGraph (Graph &graph, const armnn::TensorInfo ¶msInfo, const armnn::TensorInfo &indicesInfo, const armnn::TensorInfo &outputInfo) |
BOOST_AUTO_TEST_CASE (GatherValidateTensorShapesFromInputs) | |
BOOST_AUTO_TEST_CASE (GatherValidateTensorShapesFromInputs1DParams) | |
BOOST_AUTO_TEST_CASE (GatherValidateTensorShapesFromInputsMultiDimIndices) | |
BOOST_AUTO_TEST_CASE (DetectionPostProcessValidateTensorShapes) | |
BOOST_AUTO_TEST_CASE (FoldPadLayerIntoConvolution2dLayer) | |
BOOST_AUTO_TEST_CASE (BackendHintTest) | |
BOOST_AUTO_TEST_CASE | ( | LSTMValidateTensorShapesFromInputsCIFGDisabledTest | ) |
Definition at line 141 of file OptimizerTests.cpp.
References Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | LSTMValidateTensorShapesFromInputsCIFGEnabledTest | ) |
Definition at line 152 of file OptimizerTests.cpp.
References Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | InsertConvertersTest | ) |
Definition at line 163 of file OptimizerTests.cpp.
References armnn::Addition, CheckSequence(), armnn::ConvertFp16ToFp32, armnn::ConvertFp32ToFp16, armnn::Float16, armnn::Float32, armnn::Floor, TensorInfo::GetDataType(), Layer::GetDataType(), Layer::GetInputSlot(), Layer::GetOutputHandler(), Layer::GetOutputSlot(), OutputSlot::GetTensorInfo(), Layer::GetType(), armnn::info, armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), and OutputHandler::SetTensorInfo().
BOOST_AUTO_TEST_CASE | ( | Conv2dValidateTensorShapesFromInputs | ) |
Definition at line 284 of file OptimizerTests.cpp.
References CreateConvolution2dGraph(), and Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | Conv2dValidateTensorShapesFromInputsNhwc | ) |
Definition at line 295 of file OptimizerTests.cpp.
References CreateConvolution2dGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | DepthwiseConv2dValidateTensorShapesFromInputs | ) |
Definition at line 334 of file OptimizerTests.cpp.
References CreateDepthwiseConvolution2dGraph(), and Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | DepthwiseConv2dValidateTensorShapesFromInputsNhwc | ) |
Definition at line 345 of file OptimizerTests.cpp.
References CreateDepthwiseConvolution2dGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | Pooling2dValidateTensorShapesFromInputs | ) |
Definition at line 384 of file OptimizerTests.cpp.
References CreatePooling2dGraph(), Graph::InferTensorInfos(), and armnn::NCHW.
BOOST_AUTO_TEST_CASE | ( | Pooling2dValidateTensorShapesFromInputsNhwc | ) |
Definition at line 394 of file OptimizerTests.cpp.
References CreatePooling2dGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | ResizeBilinearValidateTensorShapesFromInputs | ) |
Definition at line 427 of file OptimizerTests.cpp.
References CreateResizeBilinearGraph(), and Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | ResizeBilinearValidateTensorShapesFromInputsNhwc | ) |
Definition at line 437 of file OptimizerTests.cpp.
References CreateResizeBilinearGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | GatherValidateTensorShapesFromInputs | ) |
Definition at line 466 of file OptimizerTests.cpp.
References CreateGatherGraph(), armnn::Float32, Graph::InferTensorInfos(), and armnn::Signed32.
BOOST_AUTO_TEST_CASE | ( | GatherValidateTensorShapesFromInputs1DParams | ) |
Definition at line 478 of file OptimizerTests.cpp.
References CreateGatherGraph(), armnn::Float32, Graph::InferTensorInfos(), and armnn::Signed32.
BOOST_AUTO_TEST_CASE | ( | GatherValidateTensorShapesFromInputsMultiDimIndices | ) |
Definition at line 490 of file OptimizerTests.cpp.
References CreateGatherGraph(), armnn::Float32, Graph::InferTensorInfos(), and armnn::Signed32.
BOOST_AUTO_TEST_CASE | ( | DetectionPostProcessValidateTensorShapes | ) |
Definition at line 502 of file OptimizerTests.cpp.
References Graph::AddLayer(), anchors(), OutputSlot::Connect(), Layer::GetInputSlot(), Layer::GetOutputSlot(), Graph::InferTensorInfos(), DetectionPostProcessLayer::m_Anchors, DetectionPostProcessDescriptor::m_MaxDetections, armnn::QAsymmU8, scoresInfo, and OutputSlot::SetTensorInfo().
BOOST_AUTO_TEST_CASE | ( | FoldPadLayerIntoConvolution2dLayer | ) |
Definition at line 537 of file OptimizerTests.cpp.
References Graph::AddLayer(), Graph::cbegin(), Graph::cend(), CheckSequence(), OutputSlot::Connect(), armnn::Float32, Layer::GetInputSlot(), Layer::GetNameStr(), Layer::GetOutputSlot(), LayerWithParameters< Parameters >::GetParameters(), armnn::IsActivationSupported(), armnn::IsInputSupported(), armnn::IsOutputSupported(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, Convolution2dLayer::m_Weight, armnn::MakeOptimizations(), armnn::NHWC, Optimizer::Pass(), and OutputSlot::SetTensorInfo().
BOOST_AUTO_TEST_CASE | ( | BackendHintTest | ) |
Definition at line 685 of file OptimizerTests.cpp.
References armnn::AssignBackends(), armnn::BackendRegistryInstance(), Layer::BackendSelectionHint(), BOOST_AUTO_TEST_SUITE_END(), OutputSlot::Connect(), INetwork::Create(), IOptimizedNetwork::Destroy(), OptimizedNetwork::GetGraph(), Layer::GetInputSlot(), Layer::GetOutputSlot(), armnn::IgnoreUnused(), OptimizationResult::IsOk(), armnn::Linear, and ActivationDescriptor::m_Function.
void CreateConvolution2dGraph | ( | Graph & | graph, |
const unsigned int * | inputShape, | ||
const unsigned int * | weightsShape, | ||
const unsigned int * | outputShape, | ||
DataLayout | dataLayout = DataLayout::NCHW |
||
) |
Definition at line 256 of file OptimizerTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), armnn::Float32, Layer::GetInputSlot(), Layer::GetOutputSlot(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, Convolution2dLayer::m_Weight, and OutputSlot::SetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE().
void CreateDepthwiseConvolution2dGraph | ( | Graph & | graph, |
const unsigned int * | inputShape, | ||
const unsigned int * | weightsShape, | ||
const unsigned int * | outputShape, | ||
DataLayout | dataLayout = DataLayout::NCHW |
||
) |
Definition at line 306 of file OptimizerTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), armnn::Float32, Layer::GetInputSlot(), Layer::GetOutputSlot(), DepthwiseConvolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_DataLayout, DepthwiseConvolution2dDescriptor::m_StrideX, DepthwiseConvolution2dDescriptor::m_StrideY, DepthwiseConvolution2dLayer::m_Weight, and OutputSlot::SetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE().
void CreateGatherGraph | ( | Graph & | graph, |
const armnn::TensorInfo & | paramsInfo, | ||
const armnn::TensorInfo & | indicesInfo, | ||
const armnn::TensorInfo & | outputInfo | ||
) |
Definition at line 448 of file OptimizerTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), Layer::GetInputSlot(), Layer::GetOutputSlot(), and OutputSlot::SetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE().
void CreatePooling2dGraph | ( | Graph & | graph, |
const unsigned int * | inputShape, | ||
const unsigned int * | outputShape, | ||
DataLayout | dataLayout = DataLayout::NCHW |
||
) |
Definition at line 356 of file OptimizerTests.cpp.
References Graph::AddLayer(), armnn::Average, OutputSlot::Connect(), armnn::Exclude, armnn::Float32, Layer::GetInputSlot(), Layer::GetOutputSlot(), Pooling2dDescriptor::m_DataLayout, Pooling2dDescriptor::m_PadBottom, Pooling2dDescriptor::m_PaddingMethod, Pooling2dDescriptor::m_PadLeft, Pooling2dDescriptor::m_PadRight, Pooling2dDescriptor::m_PadTop, Pooling2dDescriptor::m_PoolHeight, Pooling2dDescriptor::m_PoolType, Pooling2dDescriptor::m_PoolWidth, Pooling2dDescriptor::m_StrideX, Pooling2dDescriptor::m_StrideY, and OutputSlot::SetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE().
void CreateResizeBilinearGraph | ( | Graph & | graph, |
const unsigned int * | inputShape, | ||
const unsigned int * | outputShape, | ||
DataLayout | dataLayout = DataLayout::NCHW |
||
) |
Definition at line 404 of file OptimizerTests.cpp.
References Graph::AddLayer(), armnn::Bilinear, OutputSlot::Connect(), armnn::Float32, Layer::GetInputSlot(), Layer::GetOutputSlot(), ResizeDescriptor::m_DataLayout, ResizeDescriptor::m_Method, ResizeDescriptor::m_TargetHeight, ResizeDescriptor::m_TargetWidth, and OutputSlot::SetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE().