From ae050524109f1ce827962665436ef7430f2ac479 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Wed, 22 Mar 2023 16:48:58 +0000 Subject: IVGCVSW-7255 Update Doxygen Documentation and publish on GitHub. * Updating Doxygen documentation for 23.02 release. Signed-off-by: David Monahan Change-Id: I545574ff7664b4595d2fe6a91a3c35d2ad55df82 --- ...backends_2_optimization_views_8hpp_source.xhtml | 175 +++++++++++++++------ 1 file changed, 131 insertions(+), 44 deletions(-) (limited to '23.02/include_2armnn_2backends_2_optimization_views_8hpp_source.xhtml') diff --git a/23.02/include_2armnn_2backends_2_optimization_views_8hpp_source.xhtml b/23.02/include_2armnn_2backends_2_optimization_views_8hpp_source.xhtml index d9714dda93..394b3c5af5 100644 --- a/23.02/include_2armnn_2backends_2_optimization_views_8hpp_source.xhtml +++ b/23.02/include_2armnn_2backends_2_optimization_views_8hpp_source.xhtml @@ -8,7 +8,7 @@ - + ArmNN: include/armnn/backends/OptimizationViews.hpp Source File @@ -19,9 +19,6 @@ - @@ -30,7 +27,8 @@ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); - + + @@ -51,18 +49,21 @@ - + +/* @license-end */
@@ -76,7 +77,9 @@ $(function() {
@@ -98,49 +101,133 @@ $(document).ready(function(){initNavTree('include_2armnn_2backends_2_optimizatio
OptimizationViews.hpp
-Go to the documentation of this file.
1 //
2 // Copyright © 2017, 2019, 2021-2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 #include <armnn/Deprecated.hpp>
10 #include <armnn/INetwork.hpp>
12 #include <vector>
13 #include "Graph.hpp"
14 
15 namespace armnn
16 {
17 
19 {
20 public:
21  OptimizationViews(const NetworkOptions& networkOptions = {}) : m_INetwork(INetwork::Create(networkOptions)) {}
22  OptimizationViews(const OptimizationViews&) = delete;
26 
28  {
29  /// Subgraph of Layers from the original graph which should be replaced
31 
32  /// A subgraph of new layers which will replace layers in m_SubstitutableSubgraph
34  };
35 
36  using Subgraphs = std::vector<SubgraphView>;
37  using Substitutions = std::vector<SubstitutionPair>;
38 
39  void AddSubstitution(SubstitutionPair&& substitution)
40  {
41  m_SuccesfulOptimizations.emplace_back(substitution);
42  }
43 
45  {
46  m_FailedOptimizations.emplace_back(subgraph);
47  }
48 
50  {
51  m_UntouchedSubgraphs.emplace_back(subgraph);
52  }
53 
54  const Substitutions& GetSubstitutions() const { return m_SuccesfulOptimizations; }
55  const Subgraphs& GetFailedSubgraphs() const { return m_FailedOptimizations; }
56  const Subgraphs& GetUntouchedSubgraphs() const { return m_UntouchedSubgraphs; }
57 
58  Substitutions& GetSubstitutions() { return m_SuccesfulOptimizations; }
59  Subgraphs& GetFailedSubgraphs() { return m_FailedOptimizations; }
60  Subgraphs& GetUntouchedSubgraphs() { return m_UntouchedSubgraphs; }
61 
62  bool Validate(const SubgraphView& originalSubgraph) const;
63 
64  ARMNN_DEPRECATED_MSG_REMOVAL_DATE("GetGraph is deprecated. Use GetINetwork instead.", "23.08")
65  Graph& GetGraph() { return m_Graph; }
66 
67  INetwork* GetINetwork() { return m_INetwork.get(); }
68  INetwork& GetINetworkRef() { return *m_INetwork; }
69 
70 private:
71  Substitutions m_SuccesfulOptimizations; ///< Proposed substitutions from successful optimizations
72  Subgraphs m_FailedOptimizations; ///< Subgraphs from the original subgraph which cannot be supported
73  Subgraphs m_UntouchedSubgraphs; ///< Subgraphs from the original subgraph which remain unmodified
74 
75  /// Graph object used only as a container for any layer generated by the optimization process
76  Graph m_Graph;
77 
78  /// INetworkPtr object used only as a container for any layer generated by the optimization process
79  /// Also, can use to AddPrecompiledLayer to the SubstitutionPair
80  /// Use in favour of m_Graph which depreciates in 23.08
81  INetworkPtr m_INetwork = INetwork::Create();
82 };
83 
84 } //namespace armnn
static INetworkPtr Create(const NetworkOptions &networkOptions={})
Definition: Network.cpp:452
-
OptimizationViews(const NetworkOptions &networkOptions={})
- - -
void AddSubstitution(SubstitutionPair &&substitution)
-
Main network class which provides the interface for building up a neural network. ...
Definition: INetwork.hpp:260
- - -
std::vector< BackendOptions > NetworkOptions
-
std::vector< SubgraphView > Subgraphs
-
OptimizationViews & operator=(const OptimizationViews &)=delete
-
std::vector< SubstitutionPair > Substitutions
-
Copyright (c) 2021 ARM Limited and Contributors.
-
SubgraphView m_SubstitutableSubgraph
Subgraph of Layers from the original graph which should be replaced.
- - -
The SubgraphView class represents a subgraph of a Graph.
- - -
const Subgraphs & GetUntouchedSubgraphs() const
-
const Subgraphs & GetFailedSubgraphs() const
-
void AddFailedSubgraph(SubgraphView &&subgraph)
-
SubgraphView m_ReplacementSubgraph
A subgraph of new layers which will replace layers in m_SubstitutableSubgraph.
-
bool Validate(const SubgraphView &originalSubgraph) const
-
void AddUntouchedSubgraph(SubgraphView &&subgraph)
- - -
#define ARMNN_DEPRECATED_MSG_REMOVAL_DATE(message, removed_in_release)
Definition: Deprecated.hpp:44
-
const Substitutions & GetSubstitutions() const
- -
Substitutions & GetSubstitutions()
- -
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:252
- +Go to the documentation of this file.
1 //
+
2 // Copyright © 2017, 2019, 2021-2022 Arm Ltd and Contributors. All rights reserved.
+
3 // SPDX-License-Identifier: MIT
+
4 //
+
5 
+
6 #pragma once
+
7 
+ +
9 #include <armnn/Deprecated.hpp>
+
10 #include <armnn/INetwork.hpp>
+ +
12 #include <vector>
+
13 #include "Graph.hpp"
+
14 
+
15 namespace armnn
+
16 {
+
17 
+ +
19 {
+
20 public:
+
21  OptimizationViews(const NetworkOptions& networkOptions = {}) : m_INetwork(INetwork::Create(networkOptions)) {}
+
22  OptimizationViews(const OptimizationViews&) = delete;
+ + + +
26 
+ +
28  {
+
29  /// Subgraph of Layers from the original graph which should be replaced
+ +
31 
+
32  /// A subgraph of new layers which will replace layers in m_SubstitutableSubgraph
+ +
34  };
+
35 
+
36  using Subgraphs = std::vector<SubgraphView>;
+
37  using Substitutions = std::vector<SubstitutionPair>;
+
38 
+
39  void AddSubstitution(SubstitutionPair&& substitution)
+
40  {
+
41  m_SuccesfulOptimizations.emplace_back(substitution);
+
42  }
+
43 
+ +
45  {
+
46  m_FailedOptimizations.emplace_back(subgraph);
+
47  }
+
48 
+ +
50  {
+
51  m_UntouchedSubgraphs.emplace_back(subgraph);
+
52  }
+
53 
+
54  const Substitutions& GetSubstitutions() const { return m_SuccesfulOptimizations; }
+
55  const Subgraphs& GetFailedSubgraphs() const { return m_FailedOptimizations; }
+
56  const Subgraphs& GetUntouchedSubgraphs() const { return m_UntouchedSubgraphs; }
+
57 
+
58  Substitutions& GetSubstitutions() { return m_SuccesfulOptimizations; }
+
59  Subgraphs& GetFailedSubgraphs() { return m_FailedOptimizations; }
+
60  Subgraphs& GetUntouchedSubgraphs() { return m_UntouchedSubgraphs; }
+
61 
+
62  bool Validate(const SubgraphView& originalSubgraph) const;
+
63 
+
64  ARMNN_DEPRECATED_MSG_REMOVAL_DATE("GetGraph is deprecated. Use GetINetwork instead.", "23.08")
+
65  Graph& GetGraph() { return m_Graph; }
+
66 
+
67  INetwork* GetINetwork() { return m_INetwork.get(); }
+
68  INetwork& GetINetworkRef() { return *m_INetwork; }
+
69 
+
70 private:
+
71  Substitutions m_SuccesfulOptimizations; ///< Proposed substitutions from successful optimizations
+
72  Subgraphs m_FailedOptimizations; ///< Subgraphs from the original subgraph which cannot be supported
+
73  Subgraphs m_UntouchedSubgraphs; ///< Subgraphs from the original subgraph which remain unmodified
+
74 
+
75  /// Graph object used only as a container for any layer generated by the optimization process
+
76  Graph m_Graph;
+
77 
+
78  /// INetworkPtr object used only as a container for any layer generated by the optimization process
+
79  /// Also, can use to AddPrecompiledLayer to the SubstitutionPair
+
80  /// Use in favour of m_Graph which depreciates in 23.08
+
81  INetworkPtr m_INetwork = INetwork::Create();
+
82 };
+
83 
+
84 } //namespace armnn
+ + + +
SubgraphView m_ReplacementSubgraph
A subgraph of new layers which will replace layers in m_SubstitutableSubgraph.
+
std::vector< SubgraphView > Subgraphs
+
std::vector< SubstitutionPair > Substitutions
+ + +
#define ARMNN_DEPRECATED_MSG_REMOVAL_DATE(message, removed_in_release)
Definition: Deprecated.hpp:44
+
OptimizationViews(const NetworkOptions &networkOptions={})
+
void AddSubstitution(SubstitutionPair &&substitution)
+ +
Copyright (c) 2021 ARM Limited and Contributors.
+
void AddFailedSubgraph(SubgraphView &&subgraph)
+ +
std::vector< BackendOptions > NetworkOptions
+
OptimizationViews & operator=(const OptimizationViews &)=delete
+
bool Validate(const SubgraphView &originalSubgraph) const
+
void AddUntouchedSubgraph(SubgraphView &&subgraph)
+
The SubgraphView class represents a subgraph of a Graph.
+
const Subgraphs & GetUntouchedSubgraphs() const
+
const Subgraphs & GetFailedSubgraphs() const
+
static INetworkPtr Create(const NetworkOptions &networkOptions={})
Definition: Network.cpp:452
+ + +
Substitutions & GetSubstitutions()
+
Main network class which provides the interface for building up a neural network.
Definition: INetwork.hpp:260
+ +
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:252
+
const Substitutions & GetSubstitutions() const
+
SubgraphView m_SubstitutableSubgraph
Subgraph of Layers from the original graph which should be replaced.
+ + + -- cgit v1.2.1