ArmNN
NotReleased
|
#include "TestUtils.hpp"
#include <Graph.hpp>
#include <Optimizer.hpp>
#include <armnnUtils/FloatingPointConverter.hpp>
#include <backendsCommon/CpuTensorHandle.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 | ( | LSTMValidateTensorShapesFromInputsCIFGDisabledTest | ) |
Definition at line 134 of file OptimizerTests.cpp.
References Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | LSTMValidateTensorShapesFromInputsCIFGEnabledTest | ) |
Definition at line 145 of file OptimizerTests.cpp.
References Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | InsertConvertersTest | ) |
Definition at line 156 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 277 of file OptimizerTests.cpp.
References CreateConvolution2dGraph(), and Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | Conv2dValidateTensorShapesFromInputsNhwc | ) |
Definition at line 288 of file OptimizerTests.cpp.
References CreateConvolution2dGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | DepthwiseConv2dValidateTensorShapesFromInputs | ) |
Definition at line 327 of file OptimizerTests.cpp.
References CreateDepthwiseConvolution2dGraph(), and Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | DepthwiseConv2dValidateTensorShapesFromInputsNhwc | ) |
Definition at line 338 of file OptimizerTests.cpp.
References CreateDepthwiseConvolution2dGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | Pooling2dValidateTensorShapesFromInputs | ) |
Definition at line 377 of file OptimizerTests.cpp.
References CreatePooling2dGraph(), Graph::InferTensorInfos(), and armnn::NCHW.
BOOST_AUTO_TEST_CASE | ( | Pooling2dValidateTensorShapesFromInputsNhwc | ) |
Definition at line 387 of file OptimizerTests.cpp.
References CreatePooling2dGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | ResizeBilinearValidateTensorShapesFromInputs | ) |
Definition at line 420 of file OptimizerTests.cpp.
References CreateResizeBilinearGraph(), and Graph::InferTensorInfos().
BOOST_AUTO_TEST_CASE | ( | ResizeBilinearValidateTensorShapesFromInputsNhwc | ) |
Definition at line 430 of file OptimizerTests.cpp.
References CreateResizeBilinearGraph(), Graph::InferTensorInfos(), and armnn::NHWC.
BOOST_AUTO_TEST_CASE | ( | GatherValidateTensorShapesFromInputs | ) |
Definition at line 459 of file OptimizerTests.cpp.
References CreateGatherGraph(), armnn::Float32, Graph::InferTensorInfos(), and armnn::Signed32.
BOOST_AUTO_TEST_CASE | ( | GatherValidateTensorShapesFromInputs1DParams | ) |
Definition at line 471 of file OptimizerTests.cpp.
References CreateGatherGraph(), armnn::Float32, Graph::InferTensorInfos(), and armnn::Signed32.
BOOST_AUTO_TEST_CASE | ( | GatherValidateTensorShapesFromInputsMultiDimIndices | ) |
Definition at line 483 of file OptimizerTests.cpp.
References CreateGatherGraph(), armnn::Float32, Graph::InferTensorInfos(), and armnn::Signed32.
BOOST_AUTO_TEST_CASE | ( | DetectionPostProcessValidateTensorShapes | ) |
Definition at line 495 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 530 of file OptimizerTests.cpp.
References Graph::AddLayer(), BOOST_AUTO_TEST_SUITE_END(), Graph::cbegin(), Graph::cend(), CheckSequence(), OutputSlot::Connect(), armnn::Float32, Layer::GetInputSlot(), Layer::GetNameStr(), Layer::GetOutputSlot(), LayerWithParameters< Parameters >::GetParameters(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, Convolution2dLayer::m_Weight, armnn::MakeOptimizations(), armnn::NHWC, Optimizer::Pass(), and OutputSlot::SetTensorInfo().
void CreateConvolution2dGraph | ( | Graph & | graph, |
const unsigned int * | inputShape, | ||
const unsigned int * | weightsShape, | ||
const unsigned int * | outputShape, | ||
DataLayout | dataLayout = DataLayout::NCHW |
||
) |
Definition at line 249 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 299 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 441 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 349 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 397 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().