24.02
|
Algorithm that splits a Graph into Subgraphs based on a filtering of layers (e.g. More...
#include <SubgraphViewSelector.hpp>
Public Types | |
using | Subgraphs = std::vector< SubgraphView::SubgraphViewPtr > |
using | LayerSelectorFunction = std::function< bool(const Layer &)> |
Static Public Member Functions | |
static Subgraphs | SelectSubgraphs (Graph &graph, const LayerSelectorFunction &selector) |
Selects subgraphs from a graph based on the selector function and the algorithm. More... | |
static Subgraphs | SelectSubgraphs (SubgraphView &subgraph, const LayerSelectorFunction &selector) |
Algorithm that splits a Graph into Subgraphs based on a filtering of layers (e.g.
which layers are appropriate for a certain backend). The resulting subgraphs are guaranteed to be form a DAG (i.e. there are no dependency loops).
The algorithm aims to produce as few subgraphs as possible.
Definition at line 21 of file SubgraphViewSelector.hpp.
using LayerSelectorFunction = std::function<bool(const Layer&)> |
Definition at line 25 of file SubgraphViewSelector.hpp.
using Subgraphs = std::vector<SubgraphView::SubgraphViewPtr> |
Definition at line 24 of file SubgraphViewSelector.hpp.
|
static |
Selects subgraphs from a graph based on the selector function and the algorithm.
Since the Subgraphs object returns modifiable pointers to the input and output slots of the graph: 1) the graph/sub-graph cannot be const 2) the caller needs to make sure that the Subgraphs lifetime is shorter than the parent graph's
Definition at line 259 of file SubgraphViewSelector.cpp.
Referenced by armnn::ApplyBackendOptimizations().
|
static |
Definition at line 389 of file SubgraphViewSelector.cpp.
References armnn::AssignSplitId(), IOutputSlot::CalculateIndexOnOwner(), armnn::ForEachLayerOutput(), SubgraphView::GetIConnectableLayers(), SubgraphView::GetIInputSlots(), armnn::info, and armnn::IsReadyForSplitAssignment().