6 #if defined(ARMCOMPUTECL_ENABLED) 9 #if defined(ARMCOMPUTENEON_ENABLED) 17 #include <doctest/doctest.h> 22 using namespace armnn;
24 #if defined(ARMCOMPUTENEON_ENABLED) && defined(ARMCOMPUTECL_ENABLED) 29 TEST_CASE(
"Neon_Cl_DirectCompatibility_Test")
31 auto neonBackend = std::make_unique<NeonBackend>();
32 auto clBackend = std::make_unique<ClBackend>();
35 neonBackend->RegisterTensorHandleFactories(registry);
36 clBackend->RegisterTensorHandleFactories(registry);
38 const BackendId& neonBackendId = neonBackend->GetId();
39 const BackendId& clBackendId = clBackend->GetId();
42 backends[neonBackendId] = std::move(neonBackend);
43 backends[clBackendId] = std::move(clBackend);
75 std::vector<std::string> errors;
78 CHECK(result.m_Error ==
false);
79 CHECK(result.m_Warning ==
false);
131 #if defined(ARMNNREF_ENABLED) 133 TEST_CASE(
"Ref_Backends_Capability_Test")
135 auto refBackend = std::make_unique<RefBackend>();
136 auto refCapabilities = refBackend->GetCapabilities();
148 TEST_CASE(
"Ref_Backends_Unkown_Capability_Test")
150 auto refBackend = std::make_unique<RefBackend>();
151 auto refCapabilities = refBackend->GetCapabilities();
172 #if defined(ARMCOMPUTENEON_ENABLED) 174 TEST_CASE(
"Neon_Backends_Capability_Test")
176 auto neonBackend = std::make_unique<NeonBackend>();
177 auto neonCapabilities = neonBackend->GetCapabilities();
191 #if defined(ARMCOMPUTECL_ENABLED) 193 TEST_CASE(
"Cl_Backends_Capability_Test")
195 auto clBackend = std::make_unique<ClBackend>();
196 auto clCapabilities = clBackend->GetCapabilities();
TEST_SUITE("TestConstTensorLayerVisitor")
bool HasCapability(const std::string &name, const BackendCapabilities &capabilities)
Convenience function to check if a capability exists in a BackendCapabilites struct.
LayerT * AddLayer(Args &&... args)
Adds a new layer, of type LayerType, to the graph constructed with the arguments passed.
int Connect(InputSlot &destination)
Copyright (c) 2021 ARM Limited and Contributors.
void SetBackendId(const BackendId &id)
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
A layer user-provided data can be bound to (e.g. inputs, outputs).
void ForEachLayer(Func func) const
This layer represents a softmax operation.
LayerType GetType() const override
Returns the armnn::LayerType of this layer.
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
OptimizationResult SelectTensorHandleStrategy(Graph &optGraph, BackendsMap &backends, TensorHandleFactoryRegistry ®istry, bool importEnabled, Optional< std::vector< std::string > &> errMessages)
Graph & TopologicalSort()
Sorts layers in topological order and return this.
A SoftmaxDescriptor for the SoftmaxLayer.
void AddCompatibilityLayers(std::map< BackendId, std::unique_ptr< class IBackendInternal >> &backends, TensorHandleFactoryRegistry ®istry)
Modifies the graph in-place, removing edges connecting layers using different compute devices...
std::map< BackendId, std::unique_ptr< class IBackendInternal > > BackendsMap