ArmNN
 24.02
Network.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 #include <armnn/INetwork.hpp>
9 #include <armnn/LstmParams.hpp>
11 #include <armnn/TensorFwd.hpp>
12 #include <armnn/Types.hpp>
13 
14 #include <Graph.hpp>
15 #include <Layer.hpp>
16 #include <OptimizedNetworkImpl.hpp>
18 
19 #include <string>
20 #include <vector>
21 #include <map>
22 #include <memory>
23 
24 namespace armnn
25 {
26 
27 class Graph;
28 
29 using NetworkImplPtr = std::unique_ptr<NetworkImpl, void (*)(NetworkImpl* network)>;
30 
31 /// Private implementation of INetwork.
33 {
34 public:
35  NetworkImpl(const NetworkOptions& networkOptions = {});
36  ~NetworkImpl();
37 
38  const Graph& GetGraph() const
39  { return *m_Graph; }
40 
42 
43  IConnectableLayer* AddInputLayer(LayerBindingId id, const char* name = nullptr);
44 
45  IConnectableLayer* AddActivationLayer(const ActivationDescriptor& activationDescriptor,
46  const char* name = nullptr);
47  ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Use AddElementwiseBinaryLayer instead", "24.02")
48  IConnectableLayer* AddAdditionLayer(const char* name = nullptr);
49 
51  const char* name = nullptr);
52 
54  const char* name = nullptr);
55 
57  const ConstTensor& mean,
58  const ConstTensor& variance,
59  const ConstTensor& beta,
60  const ConstTensor& gamma,
61  const char* name = nullptr);
62 
63  IConnectableLayer* AddBatchToSpaceNdLayer(const BatchToSpaceNdDescriptor& batchToSpaceNdDescriptor,
64  const char* name = nullptr);
65 
67  const char* name = nullptr);
68 
69  IConnectableLayer* AddCastLayer(const char* name = nullptr);
70 
71  IConnectableLayer* AddChannelShuffleLayer(const ChannelShuffleDescriptor& channelShuffleDescriptor,
72  const char* name = nullptr);
73 
74  IConnectableLayer* AddComparisonLayer(const ComparisonDescriptor& comparisonDescriptor,
75  const char* name = nullptr);
76 
77  IConnectableLayer* AddConcatLayer(const ConcatDescriptor& concatDescriptor,
78  const char* name = nullptr);
79 
80  IConnectableLayer* AddConvolution2dLayer(const Convolution2dDescriptor& convolution2dDescriptor,
81  const char* name = nullptr);
82 
83  IConnectableLayer* AddConvolution3dLayer(const Convolution3dDescriptor& convolution3dDescriptor,
84  const char* name = nullptr);
85 
86  IConnectableLayer* AddConstantLayer(const ConstTensor& input, const char* name = nullptr);
87 
88  IConnectableLayer* AddDepthToSpaceLayer(const DepthToSpaceDescriptor& depthToSpaceDescriptor,
89  const char* name = nullptr);
90 
92  const char* name = nullptr);
93 
94  IConnectableLayer* AddDequantizeLayer(const char* name = nullptr);
95 
97  const ConstTensor& anchors,
98  const char* name = nullptr);
99 
101  IConnectableLayer* AddDivisionLayer(const char* name = nullptr);
102 
103  IConnectableLayer* AddElementwiseBinaryLayer(const ElementwiseBinaryDescriptor& elementwiseBinaryDescriptor,
104  const char* name = nullptr);
105 
106  IConnectableLayer* AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor& elementwiseUnaryDescriptor,
107  const char* name = nullptr);
108 
109  IConnectableLayer* AddMergeLayer(const char* name = nullptr);
110 
111  IConnectableLayer* AddFillLayer(const FillDescriptor& fillDescriptor,
112  const char* name = nullptr);
113 
114  IConnectableLayer* AddFloorLayer(const char* name = nullptr);
115 
116  IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
117  const char* name = nullptr);
118 
119  IConnectableLayer* AddFusedLayer(const FusedDescriptor& fusedDescriptor,
120  const char* name = nullptr);
121 
122  IConnectableLayer* AddGatherLayer(const GatherDescriptor& gatherDescriptor,
123  const char* name = nullptr);
124 
125  IConnectableLayer* AddGatherNdLayer(const char* name = nullptr);
126 
128  const char* name = nullptr);
129 
131  const char* name = nullptr);
132 
133  IConnectableLayer* AddLogSoftmaxLayer(const LogSoftmaxDescriptor& logSoftmaxDescriptor,
134  const char* name = nullptr);
135 
136  IConnectableLayer* AddLogicalBinaryLayer(const LogicalBinaryDescriptor& logicalBinaryDescriptor,
137  const char* name = nullptr);
138 
139  IConnectableLayer* AddLstmLayer(const LstmDescriptor& descriptor,
140  const LstmInputParams& params,
141  const char* name = nullptr);
142 
144  IConnectableLayer* AddMaximumLayer(const char* name = nullptr);
145 
146  IConnectableLayer* AddMeanLayer(const MeanDescriptor& meanDescriptor, const char* name = nullptr);
147 
149  IConnectableLayer* AddMinimumLayer(const char* name = nullptr);
150 
152  IConnectableLayer* AddMultiplicationLayer(const char* name = nullptr);
153 
154  IConnectableLayer* AddNormalizationLayer(const NormalizationDescriptor& normalizationDescriptor,
155  const char* name = nullptr);
156 
157  IConnectableLayer* AddOutputLayer(LayerBindingId id, const char* name = nullptr);
158 
159  IConnectableLayer* AddPadLayer(const PadDescriptor& padDescriptor, const char* name = nullptr);
160 
161  IConnectableLayer* AddPermuteLayer(const PermuteDescriptor& permuteDescriptor,
162  const char* name = nullptr);
163 
164  IConnectableLayer* AddPooling2dLayer(const Pooling2dDescriptor& pooling2dDescriptor,
165  const char* name = nullptr);
166 
167  IConnectableLayer* AddPooling3dLayer(const Pooling3dDescriptor& pooling3dDescriptor,
168  const char* name = nullptr);
169 
170  IConnectableLayer* AddPrecompiledLayer(const PreCompiledDescriptor& preCompiledDescriptor,
171  CompiledBlobPtr compiledBlobPtr,
172  const Optional<BackendId>& backend,
173  const char* name = nullptr);
174 
175  IConnectableLayer* AddPreluLayer(const char* name = nullptr);
176 
177  IConnectableLayer* AddQuantizeLayer(const char* name = nullptr);
178 
180  const LstmInputParams& params,
181  const char* name = nullptr);
182 
184  const char* name = nullptr);
185 
186  IConnectableLayer* AddRankLayer(const char* name = nullptr);
187 
188  IConnectableLayer* AddReduceLayer(const ReduceDescriptor& reduceDescriptor,
189  const char* name = nullptr);
190 
191  IConnectableLayer* AddResizeLayer(const ResizeDescriptor& resizeDescriptor,
192  const char* name = nullptr);
193 
194  IConnectableLayer* AddReshapeLayer(const ReshapeDescriptor& reshapeDescriptor,
195  const char* name = nullptr);
196 
197  IConnectableLayer* AddReverseV2Layer(const char* name = nullptr);
198 
199  IConnectableLayer* AddShapeLayer(const char* name = nullptr);
200 
201  IConnectableLayer* AddSliceLayer(const SliceDescriptor& sliceDescriptor, const char* name = nullptr);
202 
203  IConnectableLayer* AddSoftmaxLayer(const SoftmaxDescriptor& softmaxDescriptor,
204  const char* name = nullptr);
205 
206  IConnectableLayer* AddSplitterLayer(const ViewsDescriptor& splitterDescriptor,
207  const char* name = nullptr);
208 
209  IConnectableLayer* AddSpaceToBatchNdLayer(const SpaceToBatchNdDescriptor& spaceToBatchNdDescriptor,
210  const char* name = nullptr);
211 
212  IConnectableLayer* AddSpaceToDepthLayer(const SpaceToDepthDescriptor& spaceToDepthDescriptor,
213  const char* name = nullptr);
214 
215  IConnectableLayer* AddStackLayer(const StackDescriptor& stackDescriptor,
216  const char* name = nullptr);
217 
219  const char* name = nullptr);
220 
221  IConnectableLayer* AddStridedSliceLayer(const StridedSliceDescriptor& stridedSliceDescriptor,
222  const char* name = nullptr);
223 
225  IConnectableLayer* AddSubtractionLayer(const char* name = nullptr);
226 
227  IConnectableLayer* AddSwitchLayer(const char* name = nullptr);
228 
229  IConnectableLayer* AddTileLayer(const TileDescriptor& tileDescriptor,
230  const char* name = nullptr);
231 
233  const ConstTensor& weights,
234  const Optional<ConstTensor>& biases,
235  const char* name = nullptr);
236 
237  IConnectableLayer* AddTransposeLayer(const TransposeDescriptor& transposeDescriptor,
238  const char* name = nullptr);
239 
241  const LstmInputParams& params,
242  const char* name = nullptr);
243 
244  IConnectableLayer* AddConvertFp16ToFp32Layer(const char* name = nullptr);
245 
246  IConnectableLayer* AddConvertFp32ToFp16Layer(const char* name = nullptr);
247 
248  void ExecuteStrategy(IStrategy& strategy) const;
249 
250 private:
251 
252  bool GetShapeInferenceMethod();
253  bool GetAllowExpandedDims();
254  NetworkOptions m_NetworkOptions;
255 
256  std::unique_ptr<Graph> m_Graph;
257  ModelOptions m_ModelOptions;
258 };
259 
261 {
262  bool m_Warning;
263  bool m_Error;
264 
265  OptimizationResult(bool warning, bool error)
266  : m_Warning(warning), m_Error(error)
267  {}
268 
270  : OptimizationResult(false, false)
271  {}
272 
273  bool IsOk() const
274  { return !m_Warning && !m_Error; }
275  bool IsWarningOnly() const
276  { return m_Warning && !m_Error; }
277  bool IsError() const
278  { return m_Error; }
279 
280 };
281 
282 using BackendsMap = std::map<BackendId, std::unique_ptr<class IBackendInternal>>;
283 
285  struct BackendSettings& backendSettings);
286 
288  BackendsMap& backends,
289  TensorHandleFactoryRegistry& registry,
290  bool importEnabled,
291  bool exportEnabled,
292  Optional<std::vector<std::string>&> errMessages);
293 
295  BackendSettings& backendSettings,
296  Graph::Iterator& firstLayer,
297  Graph::Iterator& lastLayer,
298  Optional<std::vector<std::string>&> errMessages);
299 
300 
302  BackendSettings& backendSettings,
305  Optional<std::vector<std::string>&> errMessages);
306 
308 {
309  ~OptimizerOptionsOpaqueImpl() = default;
310 
312  : m_ReduceFp32ToFp16(false)
313  , m_Debug(false)
314  , m_DebugToFile(false)
315  , m_ReduceFp32ToBf16(false)
316  , m_shapeInferenceMethod(armnn::ShapeInferenceMethod::ValidateOnly)
317  , m_ImportEnabled(false)
318  , m_ModelOptions()
319  , m_ProfilingEnabled(false)
320  , m_ExportEnabled(false)
321  , m_AllowExpandedDims(false)
322  {
323  }
324 
325  explicit OptimizerOptionsOpaqueImpl(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16,
326  bool importEnabled, ModelOptions modelOptions = {},
327  bool exportEnabled = false, bool debugToFile = false)
328  : m_ReduceFp32ToFp16(reduceFp32ToFp16)
329  , m_Debug(debug)
330  , m_DebugToFile(debugToFile)
331  , m_ReduceFp32ToBf16(reduceFp32ToBf16)
332  , m_shapeInferenceMethod(armnn::ShapeInferenceMethod::ValidateOnly)
333  , m_ImportEnabled(importEnabled)
334  , m_ModelOptions(modelOptions)
335  , m_ProfilingEnabled(false)
336  , m_ExportEnabled(exportEnabled)
337  , m_AllowExpandedDims(false)
338  {
339  }
340 
341  explicit OptimizerOptionsOpaqueImpl(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16,
342  ShapeInferenceMethod shapeInferenceMethod,
343  bool importEnabled, ModelOptions modelOptions, bool exportEnabled,
344  bool debugToFile, bool allowExpandedDims)
345  : m_ReduceFp32ToFp16(reduceFp32ToFp16)
346  , m_Debug(debug)
347  , m_DebugToFile(debugToFile)
348  , m_ReduceFp32ToBf16(reduceFp32ToBf16)
349  , m_shapeInferenceMethod(shapeInferenceMethod)
350  , m_ImportEnabled(importEnabled)
351  , m_ModelOptions(modelOptions)
352  , m_ProfilingEnabled(false)
353  , m_ExportEnabled(exportEnabled)
354  , m_AllowExpandedDims(allowExpandedDims)
355  {
356  }
357 
358  /// Reduces all Fp32 operators in the model to Fp16 for faster processing.
359  /// If the first preferred backend does not have Fp16 support, this option will be disabled.
360  /// If the value of converted Fp16 is infinity, round to the closest finite Fp16 value.
361  /// @Note This feature works best if all operators of the model are in Fp32. ArmNN will add conversion layers
362  /// between layers that weren't in Fp32 in the first place or if the operator is not supported in Fp16.
363  /// The overhead of these conversions can lead to a slower overall performance if too many conversions are
364  /// required.
365  bool m_ReduceFp32ToFp16 = false;
366 
367  /// Add debug data for easier troubleshooting
368  bool m_Debug = false;
369 
370  /// Pass debug data to separate output files for easier troubleshooting
371  bool m_DebugToFile = false;
372 
373  /// @Note This feature has been replaced by enabling Fast Math in compute library backend options.
374  /// This is currently a placeholder option
375  bool m_ReduceFp32ToBf16 = false;
376 
377  /// Infer output size when not available
379 
380  /// Enable Import
381  bool m_ImportEnabled = false;
382 
383  /// Enable Model Options
385 
386  /// Enable profiling dump of the optimizer phase
387  bool m_ProfilingEnabled = false;
388 
389  /// Enable Export
390  bool m_ExportEnabled = false;
391 
392  /// When calculating tensor sizes, dimensions of size == 1 will be ignored
393  bool m_AllowExpandedDims = false;
394 };
395 
396 } // namespace armnn
armnn::NetworkImpl::AddDepthToSpaceLayer
IConnectableLayer * AddDepthToSpaceLayer(const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2273
armnn::BatchNormalizationDescriptor
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
Definition: Descriptors.hpp:828
armnn::NetworkImpl::AddTransposeConvolution2dLayer
IConnectableLayer * AddTransposeConvolution2dLayer(const TransposeConvolution2dDescriptor &descriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
Definition: Network.cpp:2666
armnn::OptimizerOptionsOpaqueImpl::OptimizerOptionsOpaqueImpl
OptimizerOptionsOpaqueImpl()
Definition: Network.hpp:311
armnn::OptimizationResult::m_Error
bool m_Error
Definition: Network.hpp:263
armnn::NetworkImpl::AddLogicalBinaryLayer
IConnectableLayer * AddLogicalBinaryLayer(const LogicalBinaryDescriptor &logicalBinaryDescriptor, const char *name=nullptr)
Definition: Network.cpp:2887
armnn::ViewsDescriptor
A ViewsDescriptor for the SplitterLayer.
Definition: Descriptors.hpp:244
armnn::ActivationDescriptor
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:36
armnn::NetworkImpl::AddFullyConnectedLayer
IConnectableLayer * AddFullyConnectedLayer(const FullyConnectedDescriptor &fullyConnectedDescriptor, const char *name=nullptr)
Definition: Network.cpp:2233
armnn::BackendSettings
Definition: BackendSettings.hpp:18
armnn::FullyConnectedDescriptor
A FullyConnectedDescriptor for the FullyConnectedLayer.
Definition: Descriptors.hpp:507
armnn::NetworkImpl::AddReverseV2Layer
IConnectableLayer * AddReverseV2Layer(const char *name=nullptr)
Definition: Network.cpp:3040
armnn::OptimizationResult::IsWarningOnly
bool IsWarningOnly() const
Definition: Network.hpp:275
armnn::QLstmDescriptor
A QLstmDescriptor for the QLstmLayer.
Definition: Descriptors.hpp:1380
armnn::Optional
Definition: Optional.hpp:270
armnn::OptimizationResult::OptimizationResult
OptimizationResult(bool warning, bool error)
Definition: Network.hpp:265
armnn::NetworkImpl::AddTransposeLayer
IConnectableLayer * AddTransposeLayer(const TransposeDescriptor &transposeDescriptor, const char *name=nullptr)
Definition: Network.cpp:2688
armnn::NetworkImpl::AddConvolution2dLayer
IConnectableLayer * AddConvolution2dLayer(const Convolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
Definition: Network.cpp:2251
armnn::NetworkImpl::AddBroadcastToLayer
IConnectableLayer * AddBroadcastToLayer(const BroadcastToDescriptor &descriptor, const char *name=nullptr)
Definition: Network.cpp:3083
armnn::NetworkImpl::AddTileLayer
IConnectableLayer * AddTileLayer(const TileDescriptor &tileDescriptor, const char *name=nullptr)
Definition: Network.cpp:3045
armnn::Pooling3dDescriptor
A Pooling3dDescriptor for the Pooling3dLayer.
Definition: Descriptors.hpp:431
armnn::NetworkImpl::AddDivisionLayer
IConnectableLayer * AddDivisionLayer(const char *name=nullptr)
Definition: Network.cpp:2604
armnn::ResizeDescriptor
A ResizeDescriptor for the ResizeLayer.
Definition: Descriptors.hpp:985
armnn::ArgMinMaxDescriptor
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Definition: Descriptors.hpp:67
armnn::InstanceNormalizationDescriptor
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
Definition: Descriptors.hpp:847
armnn::TensorHandleFactoryRegistry
Definition: TensorHandleFactoryRegistry.hpp:23
armnn::NetworkImpl::AddAdditionLayer
IConnectableLayer * AddAdditionLayer(const char *name=nullptr)
Definition: Network.cpp:2360
armnn::GatherDescriptor
A GatherDescriptor for the GatherLayer.
Definition: Descriptors.hpp:965
armnn::NetworkImpl::AddSplitterLayer
IConnectableLayer * AddSplitterLayer(const ViewsDescriptor &splitterDescriptor, const char *name=nullptr)
Definition: Network.cpp:2344
armnn::L2NormalizationDescriptor
A L2NormalizationDescriptor for the L2NormalizationLayer.
Definition: Descriptors.hpp:809
Graph.hpp
armnn::NormalizationDescriptor
A NormalizationDescriptor for the NormalizationLayer.
Definition: Descriptors.hpp:769
armnn::NetworkImpl::AddSubtractionLayer
IConnectableLayer * AddSubtractionLayer(const char *name=nullptr)
Definition: Network.cpp:2609
armnn::NetworkImpl::AddStridedSliceLayer
IConnectableLayer * AddStridedSliceLayer(const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2634
armnn::ChannelShuffleDescriptor
A ChannelShuffleDescriptor for the ChannelShuffle operator.
Definition: Descriptors.hpp:1562
armnn::NetworkImpl::AddLogSoftmaxLayer
IConnectableLayer * AddLogSoftmaxLayer(const LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr)
Definition: Network.cpp:2425
armnn::NetworkImpl::~NetworkImpl
~NetworkImpl()
Definition: Network.cpp:2178
armnn::NetworkImpl::AddMeanLayer
IConnectableLayer * AddMeanLayer(const MeanDescriptor &meanDescriptor, const char *name=nullptr)
Definition: Network.cpp:2614
armnn::OptimizationResult::IsError
bool IsError() const
Definition: Network.hpp:277
armnn::NetworkImpl::AddResizeLayer
IConnectableLayer * AddResizeLayer(const ResizeDescriptor &resizeDescriptor, const char *name=nullptr)
Definition: Network.cpp:2403
armnn::AssignBackends
OptimizationResult AssignBackends(OptimizedNetworkImpl *optNetObjPtr, BackendSettings &backendSettings, Graph::Iterator &firstLayer, Graph::Iterator &lastLayer, Optional< std::vector< std::string > & > errMessages)
Definition: Network.cpp:1186
armnn::NetworkImpl::AddBatchMatMulLayer
IConnectableLayer * AddBatchMatMulLayer(const BatchMatMulDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:3035
armnn::Graph::Iterator
LayerList::const_iterator Iterator
Definition: Graph.hpp:53
armnn::NetworkImpl::AddLstmLayer
IConnectableLayer * AddLstmLayer(const LstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2463
armnn::NetworkImpl::AddReduceLayer
IConnectableLayer * AddReduceLayer(const ReduceDescriptor &reduceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2397
armnn::NetworkImpl::AddConstantLayer
IConnectableLayer * AddConstantLayer(const ConstTensor &input, const char *name=nullptr)
Definition: Network.cpp:2431
armnn::OptimizerOptionsOpaqueImpl::OptimizerOptionsOpaqueImpl
OptimizerOptionsOpaqueImpl(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, ShapeInferenceMethod shapeInferenceMethod, bool importEnabled, ModelOptions modelOptions, bool exportEnabled, bool debugToFile, bool allowExpandedDims)
Definition: Network.hpp:341
armnn::SubgraphView::IConnectableLayerIterator
IConnectableLayers::iterator IConnectableLayerIterator
Definition: SubgraphView.hpp:64
armnn::StackDescriptor
A StackDescriptor for the StackLayer.
Definition: Descriptors.hpp:1251
armnn::OptimizationResult::OptimizationResult
OptimizationResult()
Definition: Network.hpp:269
armnn::NetworkImpl::AddDepthwiseConvolution2dLayer
IConnectableLayer * AddDepthwiseConvolution2dLayer(const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
Definition: Network.cpp:2279
armnn::IStrategy
Definition: IStrategy.hpp:16
armnn::SelectTensorHandleStrategy
OptimizationResult SelectTensorHandleStrategy(Graph &optGraph, BackendsMap &backends, TensorHandleFactoryRegistry &registry, bool importEnabled, bool exportEnabled, Optional< std::vector< std::string > & > errMessages)
Definition: Network.cpp:1812
armnn::BoostLogSeverityMapping::error
@ error
armnn::NetworkImpl::AddComparisonLayer
IConnectableLayer * AddComparisonLayer(const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr)
Definition: Network.cpp:2209
armnn::NetworkImpl::ExecuteStrategy
void ExecuteStrategy(IStrategy &strategy) const
Definition: Network.cpp:3088
armnn::OptimizedNetworkImpl
Definition: OptimizedNetworkImpl.hpp:11
armnn::NetworkImpl::AddSwitchLayer
IConnectableLayer * AddSwitchLayer(const char *name=nullptr)
Definition: Network.cpp:2656
armnn::OptimizationResult
Definition: Network.hpp:260
armnn::NetworkImpl::AddSpaceToDepthLayer
IConnectableLayer * AddSpaceToDepthLayer(const SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr)
Definition: Network.cpp:2452
armnn::NetworkImpl::AddFloorLayer
IConnectableLayer * AddFloorLayer(const char *name=nullptr)
Definition: Network.cpp:2458
armnn::OptimizationResult::IsOk
bool IsOk() const
Definition: Network.hpp:273
armnn::NetworkImpl::AddPermuteLayer
IConnectableLayer * AddPermuteLayer(const PermuteDescriptor &permuteDescriptor, const char *name=nullptr)
Definition: Network.cpp:2296
armnn::NetworkImpl::AddRankLayer
IConnectableLayer * AddRankLayer(const char *name=nullptr)
Definition: Network.cpp:2392
armnn::NetworkImpl::AddArgMinMaxLayer
IConnectableLayer * AddArgMinMaxLayer(const ArgMinMaxDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:2320
armnn::ElementwiseBinaryDescriptor
A ElementwiseBinaryDescriptor for the ElementwiseBinaryLayer.
Definition: Descriptors.hpp:109
armnn::CreateSupportedBackends
BackendsMap CreateSupportedBackends(TensorHandleFactoryRegistry &handleFactoryRegistry, BackendSettings &backendSettings)
Definition: Network.cpp:1309
armnn::NetworkImpl::AddBatchToSpaceNdLayer
IConnectableLayer * AddBatchToSpaceNdLayer(const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr)
Definition: Network.cpp:2193
armnn::NetworkImpl::AddPreluLayer
IConnectableLayer * AddPreluLayer(const char *name=nullptr)
Definition: Network.cpp:2661
armnn::NetworkImpl::AddUnidirectionalSequenceLstmLayer
IConnectableLayer * AddUnidirectionalSequenceLstmLayer(const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2893
TensorFwd.hpp
armnn::NetworkImpl::AddSoftmaxLayer
IConnectableLayer * AddSoftmaxLayer(const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr)
Definition: Network.cpp:2338
armnn::NetworkOptions
std::vector< BackendOptions > NetworkOptions
Definition: BackendOptions.hpp:16
LstmParams.hpp
armnn::FusedDescriptor
A FusedDescriptor for the FusedLayer.
Definition: Descriptors.hpp:944
armnn::NetworkImpl::AddBatchNormalizationLayer
IConnectableLayer * AddBatchNormalizationLayer(const BatchNormalizationDescriptor &desc, const ConstTensor &mean, const ConstTensor &variance, const ConstTensor &beta, const ConstTensor &gamma, const char *name=nullptr)
Definition: Network.cpp:2375
INetwork.hpp
armnn::NetworkImpl::AddFillLayer
IConnectableLayer * AddFillLayer(const FillDescriptor &fillDescriptor, const char *name=nullptr)
Definition: Network.cpp:2227
armnn::PadDescriptor
A PadDescriptor for the PadLayer.
Definition: Descriptors.hpp:1196
armnn::NetworkImpl::AddGatherNdLayer
IConnectableLayer * AddGatherNdLayer(const char *name=nullptr)
Definition: Network.cpp:2646
armnn::TransposeDescriptor
A TransposeDescriptor for the TransposeLayer.
Definition: Descriptors.hpp:1490
armnn::OptimizationResult::m_Warning
bool m_Warning
Definition: Network.hpp:262
armnn::SliceDescriptor
A SliceDescriptor for the SliceLayer.
Definition: Descriptors.hpp:1228
armnn::NetworkImpl::AddStackLayer
IConnectableLayer * AddStackLayer(const StackDescriptor &stackDescriptor, const char *name=nullptr)
Definition: Network.cpp:2694
armnn::NetworkImpl::AddElementwiseUnaryLayer
IConnectableLayer * AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr)
Definition: Network.cpp:2221
armnn::ReshapeDescriptor
A ReshapeDescriptor for the ReshapeLayer.
Definition: Descriptors.hpp:1023
armnn::NetworkImpl::AddConvertFp16ToFp32Layer
IConnectableLayer * AddConvertFp16ToFp32Layer(const char *name=nullptr)
Definition: Network.cpp:2257
armnn::NetworkImpl::AddOutputLayer
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:2370
armnn::LayerBindingId
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
Definition: Types.hpp:309
armnn::NetworkImpl::AddReshapeLayer
IConnectableLayer * AddReshapeLayer(const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr)
Definition: Network.cpp:2440
armnn::NetworkImpl::AddQLstmLayer
IConnectableLayer * AddQLstmLayer(const QLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2745
armnn::NetworkImpl::PrintGraph
Status PrintGraph()
Definition: Network.cpp:2182
armnn::NetworkImpl::AddInputLayer
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:2188
armnn::NetworkImpl::GetGraph
const Graph & GetGraph() const
Definition: Network.hpp:38
armnn::PermuteDescriptor
A PermuteDescriptor for the PermuteLayer.
Definition: Descriptors.hpp:149
armnn::BatchMatMulDescriptor
A BatchMatMulDescriptor for the BatchMatMul operator.
Definition: Descriptors.hpp:1584
DescriptorsFwd.hpp
armnn::NetworkImpl::AddMinimumLayer
IConnectableLayer * AddMinimumLayer(const char *name=nullptr)
Definition: Network.cpp:2355
armnn::NetworkImpl::AddElementwiseBinaryLayer
IConnectableLayer * AddElementwiseBinaryLayer(const ElementwiseBinaryDescriptor &elementwiseBinaryDescriptor, const char *name=nullptr)
Definition: Network.cpp:2215
armnn::SpaceToBatchNdDescriptor
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
Definition: Descriptors.hpp:1043
armnn::Convolution3dDescriptor
A Convolution3dDescriptor for the Convolution3dLayer.
Definition: Descriptors.hpp:588
armnn::NetworkImpl::AddQuantizeLayer
IConnectableLayer * AddQuantizeLayer(const char *name=nullptr)
Definition: Network.cpp:2624
armnn::NetworkImpl::AddNormalizationLayer
IConnectableLayer * AddNormalizationLayer(const NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr)
Definition: Network.cpp:2326
armnn::NetworkImpl
Private implementation of INetwork.
Definition: Network.hpp:32
armnn::NetworkImpl::AddMergeLayer
IConnectableLayer * AddMergeLayer(const char *name=nullptr)
Definition: Network.cpp:2651
armnn::NetworkImplPtr
std::unique_ptr< NetworkImpl, void(*)(NetworkImpl *network)> NetworkImplPtr
Definition: Network.hpp:29
armnn::NetworkImpl::AddShapeLayer
IConnectableLayer * AddShapeLayer(const char *name=nullptr)
Definition: Network.cpp:2408
armnn::OptimizerOptionsOpaqueImpl::OptimizerOptionsOpaqueImpl
OptimizerOptionsOpaqueImpl(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, bool importEnabled, ModelOptions modelOptions={}, bool exportEnabled=false, bool debugToFile=false)
Definition: Network.hpp:325
armnn::NetworkImpl::AddConcatLayer
IConnectableLayer * AddConcatLayer(const ConcatDescriptor &concatDescriptor, const char *name=nullptr)
Definition: Network.cpp:2245
armnn::NetworkImpl::AddCastLayer
IConnectableLayer * AddCastLayer(const char *name=nullptr)
Definition: Network.cpp:2199
armnn::ShapeInferenceMethod::ValidateOnly
@ ValidateOnly
Validate all output shapes.
armnn::BatchToSpaceNdDescriptor
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
Definition: Descriptors.hpp:875
armnn::Convolution2dDescriptor
A Convolution2dDescriptor for the Convolution2dLayer.
Definition: Descriptors.hpp:534
armnn::NetworkImpl::AddFusedLayer
IConnectableLayer * AddFusedLayer(const FusedDescriptor &fusedDescriptor, const char *name=nullptr)
Definition: Network.cpp:2239
armnn::NetworkImpl::AddStandInLayer
IConnectableLayer * AddStandInLayer(const StandInDescriptor &descriptor, const char *name=nullptr)
Definition: Network.cpp:2701
armnn::ComparisonDescriptor
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:89
armnn::FillDescriptor
A FillDescriptor for the FillLayer.
Definition: Descriptors.hpp:925
armnn::NetworkImpl::AddQuantizedLstmLayer
IConnectableLayer * AddQuantizedLstmLayer(const QuantizedLstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2707
armnn::StandInDescriptor
A StandInDescriptor for the StandIn layer.
Definition: Descriptors.hpp:1281
SubgraphView.hpp
armnn::NetworkImpl::AddDequantizeLayer
IConnectableLayer * AddDequantizeLayer(const char *name=nullptr)
Definition: Network.cpp:2629
armnn::LstmDescriptor
An LstmDescriptor for the LstmLayer.
Definition: Descriptors.hpp:1102
armnn::StridedSliceDescriptor
A StridedSliceDescriptor for the StridedSliceLayer.
Definition: Descriptors.hpp:1303
armnn::Status
Status
Definition: Types.hpp:42
OptimizedNetworkImpl.hpp
armnn::LogicalBinaryDescriptor
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
Definition: Descriptors.hpp:1518
armnn::BoostLogSeverityMapping::debug
@ debug
std
Definition: BackendId.hpp:149
ARMNN_DEPRECATED_MSG_REMOVAL_DATE
#define ARMNN_DEPRECATED_MSG_REMOVAL_DATE(message, removed_in_release)
Definition: Deprecated.hpp:44
armnn::BackendId
Definition: BackendId.hpp:75
armnn::NetworkImpl::AddL2NormalizationLayer
IConnectableLayer * AddL2NormalizationLayer(const L2NormalizationDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:2419
armnn::NetworkImpl::AddActivationLayer
IConnectableLayer * AddActivationLayer(const ActivationDescriptor &activationDescriptor, const char *name=nullptr)
Definition: Network.cpp:2314
armnn::OriginsDescriptor
An OriginsDescriptor for the ConcatLayer.
Definition: Descriptors.hpp:201
armnn::BackendsMap
std::map< BackendId, std::unique_ptr< class IBackendInternal > > BackendsMap
Definition: Network.hpp:282
armnn::NetworkImpl::AddPooling3dLayer
IConnectableLayer * AddPooling3dLayer(const Pooling3dDescriptor &pooling3dDescriptor, const char *name=nullptr)
Definition: Network.cpp:2308
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ElementwiseUnaryDescriptor
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:129
armnn::TransposeConvolution2dDescriptor
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
Definition: Descriptors.hpp:1440
Types.hpp
Layer.hpp
armnn::NetworkImpl::AddPooling2dLayer
IConnectableLayer * AddPooling2dLayer(const Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr)
Definition: Network.cpp:2302
QuantizedLstmParams.hpp
armnn::BoostLogSeverityMapping::warning
@ warning
armnn::ConstTensor
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:329
armnn::IConnectableLayer
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:80
armnn::NetworkImpl::AddMultiplicationLayer
IConnectableLayer * AddMultiplicationLayer(const char *name=nullptr)
Definition: Network.cpp:2365
armnn::ModelOptions
std::vector< BackendOptions > ModelOptions
Definition: BackendOptions.hpp:18
armnn::DetectionPostProcessDescriptor
Definition: Descriptors.hpp:713
armnn::PreCompiledDescriptor
A PreCompiledDescriptor for the PreCompiledLayer.
Definition: Descriptors.hpp:1367
armnn::NetworkImpl::AddConvertFp32ToFp16Layer
IConnectableLayer * AddConvertFp32ToFp16Layer(const char *name=nullptr)
Definition: Network.cpp:2262
armnn::NetworkImpl::AddInstanceNormalizationLayer
IConnectableLayer * AddInstanceNormalizationLayer(const InstanceNormalizationDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:2413
armnn::NetworkImpl::NetworkImpl
NetworkImpl(const NetworkOptions &networkOptions={})
Definition: Network.cpp:2173
armnn::NetworkImpl::AddConvolution3dLayer
IConnectableLayer * AddConvolution3dLayer(const Convolution3dDescriptor &convolution3dDescriptor, const char *name=nullptr)
Definition: Network.cpp:2267
armnn::Pooling2dDescriptor
A Pooling2dDescriptor for the Pooling2dLayer.
Definition: Descriptors.hpp:371
armnn::NetworkImpl::AddChannelShuffleLayer
IConnectableLayer * AddChannelShuffleLayer(const ChannelShuffleDescriptor &channelShuffleDescriptor, const char *name=nullptr)
Definition: Network.cpp:2203
armnn::BroadcastToDescriptor
Definition: Descriptors.hpp:1659
armnn::DepthwiseConvolution2dDescriptor
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
Definition: Descriptors.hpp:659
armnn::ShapeInferenceMethod
ShapeInferenceMethod
The ShapeInferenceMethod modify how the output shapes are treated.
Definition: Types.hpp:235
armnn::ReduceDescriptor
A ReduceDescriptor for the REDUCE operators.
Definition: Descriptors.hpp:1538
armnn::NetworkImpl::AddSpaceToBatchNdLayer
IConnectableLayer * AddSpaceToBatchNdLayer(const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr)
Definition: Network.cpp:2446
armnn::NetworkImpl::AddSliceLayer
IConnectableLayer * AddSliceLayer(const SliceDescriptor &sliceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2333
armnn::OptimizerOptionsOpaqueImpl
Definition: Network.hpp:307
armnn::LstmInputParams
Definition: LstmParams.hpp:13
armnn::MeanDescriptor
A MeanDescriptor for the MeanLayer.
Definition: Descriptors.hpp:1172
armnn::QuantizedLstmInputParams
Definition: QuantizedLstmParams.hpp:13
armnn::CompiledBlobPtr
std::unique_ptr< void, CompiledBlobDeleter > CompiledBlobPtr
Definition: INetwork.hpp:343
armnn::Graph
Definition: Graph.hpp:30
armnn::NetworkImpl::AddGatherLayer
IConnectableLayer * AddGatherLayer(const GatherDescriptor &gatherDescriptor, const char *name=nullptr)
Definition: Network.cpp:2640
armnn::NetworkImpl::AddPrecompiledLayer
IConnectableLayer * AddPrecompiledLayer(const PreCompiledDescriptor &preCompiledDescriptor, CompiledBlobPtr compiledBlobPtr, const Optional< BackendId > &backend, const char *name=nullptr)
Definition: Network.cpp:3050
armnn::OptimizerOptionsOpaqueImpl::m_ModelOptions
ModelOptions m_ModelOptions
Enable Model Options.
Definition: Network.hpp:384
armnn::TileDescriptor
Definition: Descriptors.hpp:1640
armnn::NetworkImpl::AddPadLayer
IConnectableLayer * AddPadLayer(const PadDescriptor &padDescriptor, const char *name=nullptr)
Definition: Network.cpp:2619
armnn::SoftmaxDescriptor
A SoftmaxDescriptor for the SoftmaxLayer.
Definition: Descriptors.hpp:177
armnn::SpaceToDepthDescriptor
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
Definition: Descriptors.hpp:1075
armnn::NetworkImpl::AddMaximumLayer
IConnectableLayer * AddMaximumLayer(const char *name=nullptr)
Definition: Network.cpp:2350
armnn::NetworkImpl::AddDetectionPostProcessLayer
IConnectableLayer * AddDetectionPostProcessLayer(const DetectionPostProcessDescriptor &descriptor, const ConstTensor &anchors, const char *name=nullptr)
Definition: Network.cpp:2286