aboutsummaryrefslogtreecommitdiff
path: root/src/backends
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2019-04-26 13:05:17 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-04-30 09:49:43 +0100
commitff05cc50880032614675e9422ba829785f61ba14 (patch)
treebe763d0049af9a8c8a9873a79f872b33ce30f0e4 /src/backends
parent6870b9892dfa72af630cb91ad3e6c3d868146a49 (diff)
downloadarmnn-ff05cc50880032614675e9422ba829785f61ba14.tar.gz
IVGCVSW-2405 Rename SubGraph to SubgraphView
Change-Id: Ie50aeccf053c20c3a01a75042bbc3acd824375af Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/backends')
-rw-r--r--src/backends/README.md6
-rw-r--r--src/backends/backendsCommon/IBackendInternal.hpp14
-rw-r--r--src/backends/cl/ClBackend.cpp12
-rw-r--r--src/backends/cl/ClBackend.hpp8
-rw-r--r--src/backends/neon/NeonBackend.cpp12
-rw-r--r--src/backends/neon/NeonBackend.hpp8
-rw-r--r--src/backends/reference/RefBackend.cpp12
-rw-r--r--src/backends/reference/RefBackend.hpp8
8 files changed, 41 insertions, 39 deletions
diff --git a/src/backends/README.md b/src/backends/README.md
index c269ea08da..90eeed2968 100644
--- a/src/backends/README.md
+++ b/src/backends/README.md
@@ -116,11 +116,11 @@ The interface functions to be implemented are:
virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const = 0;
virtual Optimizations GetOptimizations() const = 0;
virtual ILayerSupportSharedPtr GetLayerSupport() const = 0;
- virtual SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph, bool& optimizationAttempted) const = 0;
+ virtual SubgraphUniquePtr OptimizeSubgraph(const SubgraphView& subgraph, bool& optimizationAttempted) const = 0;
```
Note that ```GetOptimizations()``` has been deprecated.
-The method ```OptimizeSubGraph(...)``` should be used instead to specific optimizations to a given sub-graph.
+The method ```OptimizeSubgraph(...)``` should be used instead to specific optimizations to a given sub-graph.
The ArmNN framework then creates instances of the IBackendInternal interface with the help of the
[BackendRegistry](backendsCommon/BackendRegistry.hpp) singleton.
@@ -191,7 +191,7 @@ mechanism:
## The Optimizations
The backends may choose to implement backend-specific optimizations.
-This is supported through the method ```OptimizeSubGraph(...)``` to the backend interface
+This is supported through the method ```OptimizeSubgraph(...)``` to the backend interface
that allows the backends to apply their specific optimizations to a given sub-grah.
The way backends had to provide a list optimizations to the Optimizer (through the ```GetOptimizations()``` method)
diff --git a/src/backends/backendsCommon/IBackendInternal.hpp b/src/backends/backendsCommon/IBackendInternal.hpp
index 6e6d47fc90..108e66e6a8 100644
--- a/src/backends/backendsCommon/IBackendInternal.hpp
+++ b/src/backends/backendsCommon/IBackendInternal.hpp
@@ -7,8 +7,8 @@
#include <armnn/Types.hpp>
#include <armnn/IRuntime.hpp>
-#include <ISubGraphConverter.hpp>
-#include <SubGraph.hpp>
+#include <ISubgraphViewConverter.hpp>
+#include <SubgraphView.hpp>
#include <vector>
@@ -41,9 +41,9 @@ public:
using IMemoryManagerUniquePtr = std::unique_ptr<IMemoryManager>;
using IMemoryManagerSharedPtr = std::shared_ptr<IMemoryManager>;
- using ISubGraphConverterPtr = std::unique_ptr<ISubGraphConverter>;
+ using ISubgraphViewConverterPtr = std::unique_ptr<ISubgraphViewConverter>;
- using SubGraphUniquePtr = std::unique_ptr<SubGraph>;
+ using SubgraphViewUniquePtr = std::unique_ptr<SubgraphView>;
virtual IMemoryManagerUniquePtr CreateMemoryManager() const = 0;
@@ -52,12 +52,14 @@ public:
virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const = 0;
- virtual ISubGraphConverterPtr CreateSubGraphConverter(const std::shared_ptr<SubGraph>& subGraph) const = 0;
+ virtual ISubgraphViewConverterPtr CreateSubgraphViewConverter(const std::shared_ptr<SubgraphView>& subgraph)
+ const = 0;
virtual Optimizations GetOptimizations() const = 0;
virtual ILayerSupportSharedPtr GetLayerSupport() const = 0;
- virtual SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph, bool& optimizationAttempted) const = 0;
+ virtual SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph, bool& optimizationAttempted)
+ const = 0;
};
using IBackendInternalUniquePtr = std::unique_ptr<IBackendInternal>;
diff --git a/src/backends/cl/ClBackend.cpp b/src/backends/cl/ClBackend.cpp
index dfa5e7c777..25318ecdaa 100644
--- a/src/backends/cl/ClBackend.cpp
+++ b/src/backends/cl/ClBackend.cpp
@@ -63,10 +63,10 @@ ClBackend::CreateBackendContext(const IRuntime::CreationOptions& options) const
return IBackendContextPtr{new ClBackendContext{options}};
}
-IBackendInternal::ISubGraphConverterPtr ClBackend::CreateSubGraphConverter(
- const std::shared_ptr<SubGraph>& subGraph) const
+IBackendInternal::ISubgraphViewConverterPtr ClBackend::CreateSubgraphViewConverter(
+ const std::shared_ptr<SubgraphView>& subgraph) const
{
- return ISubGraphConverterPtr{};
+ return ISubgraphViewConverterPtr{};
}
IBackendInternal::Optimizations ClBackend::GetOptimizations() const
@@ -80,13 +80,13 @@ IBackendInternal::ILayerSupportSharedPtr ClBackend::GetLayerSupport() const
return layerSupport;
}
-IBackendInternal::SubGraphUniquePtr ClBackend::OptimizeSubGraph(const SubGraph& subGraph,
- bool& optimizationAttempted) const
+IBackendInternal::SubgraphViewUniquePtr ClBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
+ bool& optimizationAttempted) const
{
// Not trying to optimize the given sub-graph
optimizationAttempted = false;
- return SubGraphUniquePtr{};
+ return SubgraphViewUniquePtr{};
}
} // namespace armnn
diff --git a/src/backends/cl/ClBackend.hpp b/src/backends/cl/ClBackend.hpp
index 8133ce49f6..e50c7e12ca 100644
--- a/src/backends/cl/ClBackend.hpp
+++ b/src/backends/cl/ClBackend.hpp
@@ -25,14 +25,14 @@ public:
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override;
- IBackendInternal::ISubGraphConverterPtr CreateSubGraphConverter(
- const std::shared_ptr<SubGraph>& subGraph) const override;
+ IBackendInternal::ISubgraphViewConverterPtr CreateSubgraphViewConverter(
+ const std::shared_ptr<SubgraphView>& subgraph) const override;
IBackendInternal::Optimizations GetOptimizations() const override;
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override;
- IBackendInternal::SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph,
- bool& optimizationAttempted) const override;
+ IBackendInternal::SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph,
+ bool& optimizationAttempted) const override;
};
} // namespace armnn
diff --git a/src/backends/neon/NeonBackend.cpp b/src/backends/neon/NeonBackend.cpp
index 830d637b01..096fe26642 100644
--- a/src/backends/neon/NeonBackend.cpp
+++ b/src/backends/neon/NeonBackend.cpp
@@ -63,10 +63,10 @@ IBackendInternal::IBackendContextPtr NeonBackend::CreateBackendContext(const IRu
return IBackendContextPtr{};
}
-IBackendInternal::ISubGraphConverterPtr NeonBackend::CreateSubGraphConverter(
- const std::shared_ptr<SubGraph>& subGraph) const
+IBackendInternal::ISubgraphViewConverterPtr NeonBackend::CreateSubgraphViewConverter(
+ const std::shared_ptr<SubgraphView>& subgraph) const
{
- return ISubGraphConverterPtr{};
+ return ISubgraphViewConverterPtr{};
}
IBackendInternal::Optimizations NeonBackend::GetOptimizations() const
@@ -80,13 +80,13 @@ IBackendInternal::ILayerSupportSharedPtr NeonBackend::GetLayerSupport() const
return layerSupport;
}
-IBackendInternal::SubGraphUniquePtr NeonBackend::OptimizeSubGraph(const SubGraph& subGraph,
- bool& optimizationAttempted) const
+IBackendInternal::SubgraphViewUniquePtr NeonBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
+ bool& optimizationAttempted) const
{
// Not trying to optimize the given sub-graph
optimizationAttempted = false;
- return SubGraphUniquePtr{};
+ return SubgraphViewUniquePtr{};
}
} // namespace armnn
diff --git a/src/backends/neon/NeonBackend.hpp b/src/backends/neon/NeonBackend.hpp
index 634704571c..a2949b1e14 100644
--- a/src/backends/neon/NeonBackend.hpp
+++ b/src/backends/neon/NeonBackend.hpp
@@ -25,14 +25,14 @@ public:
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override;
- IBackendInternal::ISubGraphConverterPtr CreateSubGraphConverter(
- const std::shared_ptr<SubGraph>& subGraph) const override;
+ IBackendInternal::ISubgraphViewConverterPtr CreateSubgraphViewConverter(
+ const std::shared_ptr<SubgraphView>& subgraph) const override;
IBackendInternal::Optimizations GetOptimizations() const override;
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override;
- IBackendInternal::SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph,
- bool& optimizationAttempted) const override;
+ IBackendInternal::SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph,
+ bool& optimizationAttempted) const override;
};
} // namespace armnn
diff --git a/src/backends/reference/RefBackend.cpp b/src/backends/reference/RefBackend.cpp
index d5f5348642..006f2e7af9 100644
--- a/src/backends/reference/RefBackend.cpp
+++ b/src/backends/reference/RefBackend.cpp
@@ -56,10 +56,10 @@ IBackendInternal::IMemoryManagerUniquePtr RefBackend::CreateMemoryManager() cons
return IMemoryManagerUniquePtr{};
}
-IBackendInternal::ISubGraphConverterPtr RefBackend::CreateSubGraphConverter(
- const std::shared_ptr<SubGraph>& subGraph) const
+IBackendInternal::ISubgraphViewConverterPtr RefBackend::CreateSubgraphViewConverter(
+ const std::shared_ptr<SubgraphView>& subgraph) const
{
- return ISubGraphConverterPtr{};
+ return ISubgraphViewConverterPtr{};
}
IBackendInternal::Optimizations RefBackend::GetOptimizations() const
@@ -73,13 +73,13 @@ IBackendInternal::ILayerSupportSharedPtr RefBackend::GetLayerSupport() const
return layerSupport;
}
-IBackendInternal::SubGraphUniquePtr RefBackend::OptimizeSubGraph(const SubGraph& subGraph,
- bool& optimizationAttempted) const
+IBackendInternal::SubgraphViewUniquePtr RefBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
+ bool& optimizationAttempted) const
{
// Not trying to optimize the given sub-graph
optimizationAttempted = false;
- return SubGraphUniquePtr{};
+ return SubgraphViewUniquePtr{};
}
} // namespace armnn
diff --git a/src/backends/reference/RefBackend.hpp b/src/backends/reference/RefBackend.hpp
index 6305bf568c..8658e1a87e 100644
--- a/src/backends/reference/RefBackend.hpp
+++ b/src/backends/reference/RefBackend.hpp
@@ -25,14 +25,14 @@ public:
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override;
- IBackendInternal::ISubGraphConverterPtr CreateSubGraphConverter(
- const std::shared_ptr<SubGraph>& subGraph) const override;
+ IBackendInternal::ISubgraphViewConverterPtr CreateSubgraphViewConverter(
+ const std::shared_ptr<SubgraphView>& subgraph) const override;
IBackendInternal::Optimizations GetOptimizations() const override;
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override;
- IBackendInternal::SubGraphUniquePtr OptimizeSubGraph(const SubGraph& subGraph,
- bool& optimizationAttempted) const override;
+ IBackendInternal::SubgraphViewUniquePtr OptimizeSubgraphView(const SubgraphView& subgraph,
+ bool& optimizationAttempted) const override;
};
} // namespace armnn