25.02
|
#include "TestUtils.hpp"
#include <Graph.hpp>
#include <ResolveType.hpp>
#include <SubgraphViewSelector.hpp>
#include <armnn/BackendRegistry.hpp>
#include <armnn/Types.hpp>
#include <armnn/backends/SubgraphView.hpp>
#include <armnn/backends/TensorHandle.hpp>
#include <algorithm>
#include <random>
#include <vector>
Go to the source code of this file.
Functions | |
template<typename CollectionType > | |
bool | AreEqual (const CollectionType &lhs, const CollectionType &rhs) |
template<typename CollectionType > | |
bool | Contains (const CollectionType &collection, const typename CollectionType::value_type &item) |
template<typename MapType > | |
bool | Contains (const MapType &map, const typename MapType::key_type &key) |
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> | |
bool | Compare (T a, T b, float tolerance=0.000001f) |
armnn::SubgraphView::InputSlots | CreateInputsFrom (armnn::Layer *layer, std::vector< unsigned int > ignoreSlots={}) |
armnn::SubgraphView::InputSlots | CreateInputsFrom (const std::vector< armnn::Layer * > &layers, std::vector< unsigned int > ignoreSlots={}) |
armnn::SubgraphView::OutputSlots | CreateOutputsFrom (const std::vector< armnn::Layer * > &layers) |
armnn::SubgraphView::SubgraphViewPtr | CreateSubgraphViewFrom (armnn::SubgraphView::InputSlots &&inputs, armnn::SubgraphView::OutputSlots &&outputs, armnn::SubgraphView::Layers &&layers) |
armnn::IBackendInternalUniquePtr | CreateBackendObject (const armnn::BackendId &backendId) |
armnn::TensorShape | MakeTensorShape (unsigned int batches, unsigned int channels, unsigned int height, unsigned int width, armnn::DataLayout layout) |
bool AreEqual | ( | const CollectionType & | lhs, |
const CollectionType & | rhs | ||
) |
Definition at line 27 of file CommonTestUtils.hpp.
|
inline |
bool Contains | ( | const CollectionType & | collection, |
const typename CollectionType::value_type & | item | ||
) |
Definition at line 44 of file CommonTestUtils.hpp.
bool Contains | ( | const MapType & | map, |
const typename MapType::key_type & | key | ||
) |
Definition at line 51 of file CommonTestUtils.hpp.
armnn::IBackendInternalUniquePtr CreateBackendObject | ( | const armnn::BackendId & | backendId | ) |
Definition at line 72 of file CommonTestUtils.cpp.
References armnn::BackendRegistryInstance().
armnn::SubgraphView::InputSlots CreateInputsFrom | ( | armnn::Layer * | layer, |
std::vector< unsigned int > | ignoreSlots = {} |
||
) |
Definition at line 12 of file CommonTestUtils.cpp.
References Layer::BeginInputSlots(), and Layer::EndInputSlots().
armnn::SubgraphView::InputSlots CreateInputsFrom | ( | const std::vector< armnn::Layer * > & | layers, |
std::vector< unsigned int > | ignoreSlots = {} |
||
) |
Definition at line 31 of file CommonTestUtils.cpp.
armnn::SubgraphView::OutputSlots CreateOutputsFrom | ( | const std::vector< armnn::Layer * > & | layers | ) |
Definition at line 52 of file CommonTestUtils.cpp.
armnn::SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom | ( | armnn::SubgraphView::InputSlots && | inputs, |
armnn::SubgraphView::OutputSlots && | outputs, | ||
armnn::SubgraphView::Layers && | layers | ||
) |
Definition at line 65 of file CommonTestUtils.cpp.
armnn::TensorShape MakeTensorShape | ( | unsigned int | batches, |
unsigned int | channels, | ||
unsigned int | height, | ||
unsigned int | width, | ||
armnn::DataLayout | layout | ||
) |
Definition at line 81 of file CommonTestUtils.cpp.
References armnn::GetDataLayoutName(), armnn::NCHW, and armnn::NHWC.