ArmNN
 24.11
Types.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2018-2024 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <array>
8 #include <functional>
9 #include <stdint.h>
10 #include <chrono>
11 #include "BackendId.hpp"
12 #include "Exceptions.hpp"
13 #include "Deprecated.hpp"
14 
15 namespace arm
16 {
17 namespace pipe
18 {
19 
20 class ProfilingGuid;
21 
22 } // namespace arm
23 } // namespace pipe
24 
25 /// Define LayerGuid type.
26 using LayerGuid = arm::pipe::ProfilingGuid;
27 
28 namespace armnn
29 {
30 
31 constexpr unsigned int MaxNumOfTensorDimensions = 5U;
32 
33 /// The lowest performance data capture interval we support is 10 miliseconds.
34 constexpr unsigned int LOWEST_CAPTURE_PERIOD = 10000u;
35 
36 /// Variable to control expire rate of priority queue
37 constexpr unsigned int EXPIRE_RATE = 3U;
38 
39 /// @enum Status enumeration
40 /// @var Status::Successful
41 /// @var Status::Failure
42 enum class Status
43 {
44  Success = 0,
45  Failure = 1
46 };
47 
48 enum class DataType
49 {
50  Float16 = 0,
51  Float32 = 1,
52  QAsymmU8 = 2,
53  Signed32 = 3,
54  Boolean = 4,
55  QSymmS16 = 5,
56  QSymmS8 = 6,
57  QAsymmS8 = 7,
58  BFloat16 = 8,
59  Signed64 = 9,
60 };
61 
62 enum class DataLayout
63 {
64  NCHW = 1,
65  NHWC = 2,
66  NDHWC = 3,
67  NCDHW = 4
68 };
69 
70 /// Define the behaviour of the internal profiler when outputting network details
72 {
73  Undefined = 0,
75  DetailsOnly = 2
76 };
77 
78 
79 enum class QosExecPriority
80 {
81  Low = 0,
82  Medium = 1,
83  High = 2
84 };
85 
87 {
88  Sigmoid = 0,
89  TanH = 1,
90  Linear = 2,
91  ReLu = 3,
92  BoundedReLu = 4, ///< min(a, max(b, input)) ReLu1 & ReLu6.
93  SoftReLu = 5,
94  LeakyReLu = 6,
95  Abs = 7,
96  Sqrt = 8,
97  Square = 9,
98  Elu = 10,
99  HardSwish = 11,
100  Gelu = 12
101 };
102 
104 {
105  Min = 0,
106  Max = 1
107 };
108 
110 {
111  Equal = 0,
112  Greater = 1,
113  GreaterOrEqual = 2,
114  Less = 3,
115  LessOrEqual = 4,
116  NotEqual = 5
117 };
118 
120 {
121  LogicalAnd = 0,
122  LogicalOr = 1
123 };
124 
125 enum class UnaryOperation
126 {
127  Abs = 0,
128  Exp = 1,
129  Sqrt = 2,
130  Rsqrt = 3,
131  Neg = 4,
132  LogicalNot = 5,
133  Log = 6,
134  Sin = 7,
135  Ceil = 8
136 };
137 
138 enum class BinaryOperation
139 {
140  Add = 0,
141  Div = 1,
142  Maximum = 2,
143  Minimum = 3,
144  Mul = 4,
145  Sub = 5,
146  SqDiff = 6,
147  Power = 7,
148  FloorDiv = 8
149 };
150 
152 {
153  Max = 0,
154  Average = 1,
155  L2 = 2
156 };
157 
158 enum class ReduceOperation
159 {
160  Sum = 0,
161  Max = 1,
162  Mean = 2,
163  Min = 3,
164  Prod = 4
165 };
166 
167 enum class ResizeMethod
168 {
169  Bilinear = 0,
170  NearestNeighbor = 1
171 };
172 
173 enum class Dimensionality
174 {
175  NotSpecified = 0,
176  Specified = 1,
177  Scalar = 2
178 };
179 
180 ///
181 /// The padding method modifies the output of pooling layers.
182 /// In both supported methods, the values are ignored (they are
183 /// not even zeroes, which would make a difference for max pooling
184 /// a tensor with negative values). The difference between
185 /// IgnoreValue and Exclude is that the former counts the padding
186 /// fields in the divisor of Average and L2 pooling, while
187 /// Exclude does not.
188 ///
189 enum class PaddingMethod
190 {
191  /// The padding fields count, but are ignored
192  IgnoreValue = 0,
193  /// The padding fields don't count and are ignored
194  Exclude = 1
195 };
196 
197 ///
198 /// The padding mode controls whether the padding should be filled with constant values (Constant), or
199 /// reflect the input, either including the border values (Symmetric) or not (Reflect).
200 ///
201 enum class PaddingMode
202 {
203  Constant = 0,
204  Reflect = 1,
205  Symmetric = 2
206 };
207 
209 {
210  Across = 0,
211  Within = 1
212 };
213 
215 {
216  /// Krichevsky 2012: Local Brightness Normalization
217  LocalBrightness = 0,
218  /// Jarret 2009: Local Contrast Normalization
219  LocalContrast = 1
220 };
221 
223 {
224  Floor = 0,
225  Ceiling = 1
226 };
227 
228 ///
229 /// The ShapeInferenceMethod modify how the output shapes are treated.
230 /// When ValidateOnly is selected, the output shapes are inferred from the input parameters of the layer
231 /// and any mismatch is reported.
232 /// When InferAndValidate is selected 2 actions are performed: (1)infer output shape from inputs and (2)validate the
233 /// shapes as in ValidateOnly. This option has been added to work with tensors which rank or dimension sizes are not
234 /// specified explicitly, however this information can be calculated from the inputs.
235 ///
237 {
238  /// Validate all output shapes
239  ValidateOnly = 0,
240  /// Infer missing output shapes and validate all output shapes
241  InferAndValidate = 1
242 };
243 
244 /// Define the Memory Source to reduce copies
245 enum class MemorySource : uint32_t
246 {
247  Undefined = 0,
248  Malloc = 1,
249  DmaBuf = 2,
250  DmaBufProtected = 4,
251  Gralloc = 8
252 };
253 
255 {
256  // MemBlocks can be packed on the Y axis only, overlap allowed on X axis.
257  // In other words MemBlocks with overlapping lifetimes cannot use the same MemBin,
258  // equivalent to blob or pooling memory management.
259  SingleAxisPacking = 0,
260 
261  // MemBlocks can be packed on either Y or X axis but cannot overlap on both.
262  // In other words MemBlocks with overlapping lifetimes can use the same MemBin,
263  // equivalent to offset or slab memory management.
264  MultiAxisPacking = 1
265 };
266 
267 enum class FusedKernelType
268 {
269  AddMulAdd = 0
270 };
271 
272 /// Each backend should implement an IBackend.
273 class IBackend
274 {
275 protected:
276  IBackend() {}
277  virtual ~IBackend() {}
278 
279 public:
280  virtual const BackendId& GetId() const = 0;
281 };
282 
283 using IBackendSharedPtr = std::shared_ptr<IBackend>;
284 using IBackendUniquePtr = std::unique_ptr<IBackend, void(*)(IBackend* backend)>;
285 
286 /// BackendCapability class
287 enum class BackendCapability : uint32_t
288 {
289  /// Constant weights can be accessed through the descriptors,
290  /// On the other hand, non-const weights can be accessed through inputs.
292 
293  /// Asynchronous Execution.
295 
296  /// False: Backends that can only be used if all layers in the graph are supported on that backend.
297  /// True: Backends that can be combined with other backends to run a graph.
298  AllOrNothing,
299 
300  // add new enum values here
301 };
302 
303 /// Device specific knowledge to be passed to the optimizer.
305 {
306 protected:
308  virtual ~IDeviceSpec() {}
309 public:
310  virtual const BackendIdSet& GetSupportedBackends() const = 0;
311 };
312 
313 /// Type of identifiers for bindable layers (inputs, outputs).
314 using LayerBindingId = int;
315 using ImportedInputId = unsigned int;
316 using ImportedOutputId = unsigned int;
317 
318 
320 {
321 public:
322  using ValueType = unsigned int;
323  using SizeType = unsigned int;
324  using ArrayType = std::array<ValueType, MaxNumOfTensorDimensions>;
325  using ConstIterator = typename ArrayType::const_iterator;
326 
327  /// @param dimMappings - Indicates how to translate tensor elements from a given source into the target destination,
328  /// when source and target potentially have different memory layouts.
329  ///
330  /// E.g. For a 4-d tensor laid out in a memory with the format (Batch Element, Height, Width, Channels),
331  /// which is to be passed as an input to ArmNN, each source dimension is mapped to the corresponding
332  /// ArmNN dimension. The Batch dimension remains the same (0 -> 0). The source Height dimension is mapped
333  /// to the location of the ArmNN Height dimension (1 -> 2). Similar arguments are made for the Width and
334  /// Channels (2 -> 3 and 3 -> 1). This will lead to @ref m_DimMappings pointing to the following array:
335  /// [ 0, 2, 3, 1 ].
336  ///
337  /// Note that the mapping should be reversed if considering the case of ArmNN 4-d outputs (Batch Element,
338  /// Channels, Height, Width) being written to a destination with the format mentioned above. We now have
339  /// 0 -> 0, 2 -> 1, 3 -> 2, 1 -> 3, which, when reordered, lead to the following @ref m_DimMappings contents:
340  /// [ 0, 3, 1, 2 ].
341  ///
342  PermutationVector(const ValueType *dimMappings, SizeType numDimMappings);
343 
344  PermutationVector(std::initializer_list<ValueType> dimMappings);
345 
346  ///
347  /// Indexing method with out-of-bounds error checking for the m_DimMappings array.
348  /// @param i - integer value corresponding to index of m_DimMappings array to retrieve element from.
349  /// @return element at index i of m_DimMappings array.
350  /// @throws InvalidArgumentException when indexing out-of-bounds index of m_DimMappings array.
351  ///
353  {
354  if (i >= GetSize())
355  {
356  throw InvalidArgumentException("Invalid indexing of PermutationVector of size " + std::to_string(GetSize())
357  + " at location [" + std::to_string(i) + "].");
358  }
359  return m_DimMappings.at(i);
360  }
361 
362  SizeType GetSize() const { return m_NumDimMappings; }
363 
364  ConstIterator begin() const { return m_DimMappings.begin(); }
365  /**
366  *
367  * @return pointer one past the end of the number of mapping not the length of m_DimMappings.
368  */
369  ConstIterator end() const { return m_DimMappings.begin() + m_NumDimMappings; }
370 
371  bool IsEqual(const PermutationVector& other) const
372  {
373  if (m_NumDimMappings != other.m_NumDimMappings) return false;
374  for (unsigned int i = 0; i < m_NumDimMappings; ++i)
375  {
376  if (m_DimMappings[i] != other.m_DimMappings[i]) return false;
377  }
378  return true;
379  }
380 
381  bool IsInverse(const PermutationVector& other) const
382  {
383  bool isInverse = (GetSize() == other.GetSize());
384  for (SizeType i = 0; isInverse && (i < GetSize()); ++i)
385  {
386  isInverse = (m_DimMappings[other.m_DimMappings[i]] == i);
387  }
388  return isInverse;
389  }
390 
391 private:
392  ArrayType m_DimMappings;
393  /// Number of valid entries in @ref m_DimMappings
394  SizeType m_NumDimMappings;
395 };
396 
397 class ITensorHandle;
398 
399 /// Define the type of callback for the Debug layer to call
400 /// @param guid - guid of layer connected to the input of the Debug layer
401 /// @param slotIndex - index of the output slot connected to the input of the Debug layer
402 /// @param tensorHandle - TensorHandle for the input tensor to the Debug layer
403 using DebugCallbackFunction = std::function<void(LayerGuid guid, unsigned int slotIndex, ITensorHandle* tensorHandle)>;
404 
405 /// Define a timer and associated inference ID for recording execution times
406 using HighResolutionClock = std::chrono::high_resolution_clock::time_point;
407 using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>;
408 
409 
410 /// This list uses X macro technique.
411 /// See https://en.wikipedia.org/wiki/X_Macro for more info
412 // New layers should be added at last position to minimize instability.
413 #define LIST_OF_LAYER_TYPE \
414  X(Activation) \
415  X(Addition) \
416  X(ArgMinMax) \
417  X(BatchNormalization) \
418  X(BatchToSpaceNd) \
419  X(Comparison) \
420  X(Concat) \
421  X(Constant) \
422  X(ConvertFp16ToFp32) \
423  X(ConvertFp32ToFp16) \
424  X(Convolution2d) \
425  X(Debug) \
426  X(DepthToSpace) \
427  X(DepthwiseConvolution2d) \
428  X(Dequantize) \
429  X(DetectionPostProcess) \
430  X(Division) \
431  X(ElementwiseUnary) \
432  X(FakeQuantization) \
433  X(Fill) \
434  X(Floor) \
435  X(FullyConnected) \
436  X(Gather) \
437  X(Input) \
438  X(InstanceNormalization) \
439  X(L2Normalization) \
440  X(LogicalBinary) \
441  X(LogSoftmax) \
442  X(Lstm) \
443  X(QLstm) \
444  X(Map) \
445  X(Maximum) \
446  X(Mean) \
447  X(MemCopy) \
448  X(MemImport) \
449  X(Merge) \
450  X(Minimum) \
451  X(Multiplication) \
452  X(Normalization) \
453  X(Output) \
454  X(Pad) \
455  X(Permute) \
456  X(Pooling2d) \
457  X(PreCompiled) \
458  X(Prelu) \
459  X(Quantize) \
460  X(QuantizedLstm) \
461  X(Reshape) \
462  X(Rank) \
463  X(Resize) \
464  X(Reduce) \
465  X(Slice) \
466  X(Softmax) \
467  X(SpaceToBatchNd) \
468  X(SpaceToDepth) \
469  X(Splitter) \
470  X(Stack) \
471  X(StandIn) \
472  X(StridedSlice) \
473  X(Subtraction) \
474  X(Switch) \
475  X(Transpose) \
476  X(TransposeConvolution2d) \
477  X(Unmap) \
478  X(Cast) \
479  X(Shape) \
480  X(UnidirectionalSequenceLstm) \
481  X(ChannelShuffle) \
482  X(Convolution3d) \
483  X(Pooling3d) \
484  X(GatherNd) \
485  X(BatchMatMul) \
486  X(ElementwiseBinary) \
487  X(ReverseV2) \
488  X(Tile) \
489  X(Fused) \
490  X(BroadcastTo) \
491  X(ScatterNd) \
492 // New layers should be added at last position to minimize instability.
493 
494 /// When adding a new layer, adapt also the LastLayer enum value in the
495 /// enum class LayerType below
496 enum class LayerType
497 {
498 #define X(name) name,
500 #undef X
503 };
504 
506 {
507  Update = 0,
508  Add = 1,
509  Sub = 2,
510  Max = 3,
511  Min = 4,
512  Mul = 5
513 };
514 
515 const char* GetLayerTypeAsCString(LayerType type);
516 
517 } // namespace armnn
armnn::ArgMinMaxFunction::Max
@ Max
armnn::MemorySource::Malloc
@ Malloc
armnn::PaddingMode::Symmetric
@ Symmetric
armnn::PermutationVector::IsEqual
bool IsEqual(const PermutationVector &other) const
Definition: Types.hpp:371
armnn::ImportedInputId
unsigned int ImportedInputId
Definition: Types.hpp:315
armnn::MemBlockStrategyType::MultiAxisPacking
@ MultiAxisPacking
armnn::BinaryOperation::Mul
@ Mul
armnn::DataType::Boolean
@ Boolean
armnn::NormalizationAlgorithmChannel::Within
@ Within
armnn::BinaryOperation::Add
@ Add
armnn::PermutationVector::IsInverse
bool IsInverse(const PermutationVector &other) const
Definition: Types.hpp:381
arm
Definition: BackendRegistry.hpp:15
armnn::ComparisonOperation::LessOrEqual
@ LessOrEqual
armnn::ScatterNdFunction::Min
@ Min
armnn::GetLayerTypeAsCString
const char * GetLayerTypeAsCString(LayerType type)
Definition: InternalTypes.cpp:13
armnn::DataLayout::NCDHW
@ NCDHW
armnn::ActivationFunction::LeakyReLu
@ LeakyReLu
armnn::MemorySource::Gralloc
@ Gralloc
armnn::ResizeMethod
ResizeMethod
Definition: Types.hpp:167
armnn::DataLayout
DataLayout
Definition: Types.hpp:62
armnn::InferenceTimingPair
std::pair< HighResolutionClock, HighResolutionClock > InferenceTimingPair
Definition: Types.hpp:407
armnn::QosExecPriority::Medium
@ Medium
armnn::ScatterNdFunction::Sub
@ Sub
armnn::PermutationVector::ArrayType
std::array< ValueType, MaxNumOfTensorDimensions > ArrayType
Definition: Types.hpp:324
armnn::DataLayout::NHWC
@ NHWC
armnn::ActivationFunction::SoftReLu
@ SoftReLu
armnn::BackendCapability::NonConstWeights
@ NonConstWeights
Constant weights can be accessed through the descriptors, On the other hand, non-const weights can be...
armnn::BackendIdSet
std::unordered_set< BackendId > BackendIdSet
Definition: BackendId.hpp:193
armnn::IBackendUniquePtr
std::unique_ptr< IBackend, void(*)(IBackend *backend)> IBackendUniquePtr
Definition: Types.hpp:284
armnn::ActivationFunction::Sqrt
@ Sqrt
armnn::BackendCapability::AllOrNothing
@ AllOrNothing
False: Backends that can only be used if all layers in the graph are supported on that backend.
armnn::OutputShapeRounding
OutputShapeRounding
Definition: Types.hpp:222
armnn::MemorySource::DmaBufProtected
@ DmaBufProtected
armnn::NormalizationAlgorithmMethod::LocalBrightness
@ LocalBrightness
Krichevsky 2012: Local Brightness Normalization.
armnn::IBackend::IBackend
IBackend()
Definition: Types.hpp:276
armnn::NormalizationAlgorithmMethod
NormalizationAlgorithmMethod
Definition: Types.hpp:214
armnn::BinaryOperation::Sub
@ Sub
armnn::BackendCapability
BackendCapability
BackendCapability class.
Definition: Types.hpp:287
armnn::OutputShapeRounding::Floor
@ Floor
Deprecated.hpp
BackendId.hpp
armnn::DataType::Float32
@ Float32
armnn::ActivationFunction::TanH
@ TanH
armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::LogicalBinaryOperation::LogicalOr
@ LogicalOr
armnn::PoolingAlgorithm::L2
@ L2
armnn::PaddingMode
PaddingMode
The padding mode controls whether the padding should be filled with constant values (Constant),...
Definition: Types.hpp:201
armnn::PermutationVector::operator[]
ValueType operator[](SizeType i) const
Indexing method with out-of-bounds error checking for the m_DimMappings array.
Definition: Types.hpp:352
armnn::MaxNumOfTensorDimensions
constexpr unsigned int MaxNumOfTensorDimensions
Definition: Types.hpp:31
armnn::PermutationVector::begin
ConstIterator begin() const
Definition: Types.hpp:364
armnn::DataType::QAsymmU8
@ QAsymmU8
armnn::QosExecPriority::High
@ High
armnn::ArgMinMaxFunction
ArgMinMaxFunction
Definition: Types.hpp:103
armnn::ActivationFunction::BoundedReLu
@ BoundedReLu
min(a, max(b, input)) ReLu1 & ReLu6.
armnn::DataType::QSymmS8
@ QSymmS8
armnn::UnaryOperation::Neg
@ Neg
armnn::LogicalBinaryOperation
LogicalBinaryOperation
Definition: Types.hpp:119
armnn::LOWEST_CAPTURE_PERIOD
constexpr unsigned int LOWEST_CAPTURE_PERIOD
The lowest performance data capture interval we support is 10 miliseconds.
Definition: Types.hpp:34
armnn::ReduceOperation::Mean
@ Mean
armnn::PermutationVector::end
ConstIterator end() const
Definition: Types.hpp:369
armnn::ActivationFunction::HardSwish
@ HardSwish
armnn::DataType::QSymmS16
@ QSymmS16
armnn::ActivationFunction::Gelu
@ Gelu
armnn::ProfilingDetailsMethod::Undefined
@ Undefined
armnn::NormalizationAlgorithmChannel::Across
@ Across
armnn::ComparisonOperation::NotEqual
@ NotEqual
armnn::ComparisonOperation::GreaterOrEqual
@ GreaterOrEqual
armnn::FusedKernelType::AddMulAdd
@ AddMulAdd
armnn::QosExecPriority::Low
@ Low
armnn::DataLayout::NDHWC
@ NDHWC
armnn::ScatterNdFunction::Mul
@ Mul
armnn::Dimensionality
Dimensionality
Definition: Types.hpp:173
armnn::IDeviceSpec::~IDeviceSpec
virtual ~IDeviceSpec()
Definition: Types.hpp:308
armnn::BinaryOperation::Maximum
@ Maximum
armnn::DataType::Float16
@ Float16
armnn::BinaryOperation::SqDiff
@ SqDiff
armnn::IBackend::GetId
virtual const BackendId & GetId() const =0
armnn::UnaryOperation::Rsqrt
@ Rsqrt
armnn::ComparisonOperation::Less
@ Less
armnn::UnaryOperation::Sqrt
@ Sqrt
armnn::UnaryOperation::LogicalNot
@ LogicalNot
armnn::QosExecPriority
QosExecPriority
Definition: Types.hpp:79
armnn::LayerType::ScatterNd
@ ScatterNd
armnn::UnaryOperation::Exp
@ Exp
armnn::MemorySource::Undefined
@ Undefined
armnn::MemorySource::DmaBuf
@ DmaBuf
armnn::PaddingMethod::Exclude
@ Exclude
The padding fields don't count and are ignored.
armnn::DataType
DataType
Definition: Types.hpp:48
armnn::Dimensionality::Scalar
@ Scalar
armnn::ActivationFunction::Elu
@ Elu
armnn::PaddingMethod::IgnoreValue
@ IgnoreValue
The padding fields count, but are ignored.
armnn::InvalidArgumentException
Definition: Exceptions.hpp:80
armnn::UnaryOperation::Sin
@ Sin
armnn::LayerBindingId
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
Definition: Types.hpp:314
armnn::ActivationFunction::Linear
@ Linear
armnn::ScatterNdFunction
ScatterNdFunction
Definition: Types.hpp:505
armnn::ProfilingDetailsMethod
ProfilingDetailsMethod
Define the behaviour of the internal profiler when outputting network details.
Definition: Types.hpp:71
armnn::MemBlockStrategyType
MemBlockStrategyType
Definition: Types.hpp:254
armnn::ReduceOperation::Sum
@ Sum
armnn::MemBlockStrategyType::SingleAxisPacking
@ SingleAxisPacking
armnn::PermutationVector
Definition: Types.hpp:319
armnn::Status::Success
@ Success
armnn::IBackend
Each backend should implement an IBackend.
Definition: Types.hpp:273
armnn::Dimensionality::NotSpecified
@ NotSpecified
armnn::ScatterNdFunction::Add
@ Add
armnn::ResizeMethod::NearestNeighbor
@ NearestNeighbor
armnn::ActivationFunction
ActivationFunction
Definition: Types.hpp:86
armnn::BinaryOperation::Power
@ Power
armnn::UnaryOperation
UnaryOperation
Definition: Types.hpp:125
armnn::BackendCapability::AsyncExecution
@ AsyncExecution
Asynchronous Execution.
armnn::PoolingAlgorithm::Average
@ Average
LayerGuid
arm::pipe::ProfilingGuid LayerGuid
Define LayerGuid type.
Definition: Types.hpp:26
armnn::DataType::Signed32
@ Signed32
armnn::UnaryOperation::Ceil
@ Ceil
armnn::ShapeInferenceMethod::ValidateOnly
@ ValidateOnly
Validate all output shapes.
armnn::ShapeInferenceMethod::InferAndValidate
@ InferAndValidate
Infer missing output shapes and validate all output shapes.
armnn::ReduceOperation::Prod
@ Prod
armnn::ActivationFunction::Abs
@ Abs
armnn::ImportedOutputId
unsigned int ImportedOutputId
Definition: Types.hpp:316
armnn::DataType::QAsymmS8
@ QAsymmS8
armnn::ResizeMethod::Bilinear
@ Bilinear
armnn::ArgMinMaxFunction::Min
@ Min
armnn::LayerType::LastLayer
@ LastLayer
armnn::FusedKernelType
FusedKernelType
Definition: Types.hpp:267
armnn::UnaryOperation::Log
@ Log
armnn::LogicalBinaryOperation::LogicalAnd
@ LogicalAnd
armnn::PermutationVector::GetSize
SizeType GetSize() const
Definition: Types.hpp:362
armnn::PermutationVector::ConstIterator
typename ArrayType::const_iterator ConstIterator
Definition: Types.hpp:325
armnn::ComparisonOperation
ComparisonOperation
Definition: Types.hpp:109
armnn::Dimensionality::Specified
@ Specified
armnn::Status
Status
Definition: Types.hpp:42
armnn::BinaryOperation::FloorDiv
@ FloorDiv
armnn::ProfilingDetailsMethod::DetailsOnly
@ DetailsOnly
armnn::BinaryOperation
BinaryOperation
Definition: Types.hpp:138
armnn::BFloat16
Definition: BFloat16.hpp:15
armnn::DebugCallbackFunction
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
Definition: Types.hpp:403
armnn::MemorySource
MemorySource
Define the Memory Source to reduce copies.
Definition: Types.hpp:245
LIST_OF_LAYER_TYPE
#define LIST_OF_LAYER_TYPE
This list uses X macro technique.
Definition: Types.hpp:413
armnn::ScatterNdFunction::Update
@ Update
armnn::BackendId
Definition: BackendId.hpp:75
armnn::BinaryOperation::Minimum
@ Minimum
armnn::ScatterNdFunction::Max
@ Max
armnn::ProfilingDetailsMethod::DetailsWithEvents
@ DetailsWithEvents
armnn::ActivationFunction::ReLu
@ ReLu
Exceptions.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::PermutationVector::ValueType
unsigned int ValueType
Definition: Types.hpp:322
armnn::PoolingAlgorithm::Max
@ Max
armnn::ReduceOperation
ReduceOperation
Definition: Types.hpp:158
armnn::UnaryOperation::Abs
@ Abs
armnn::ReduceOperation::Min
@ Min
armnn::ActivationFunction::Square
@ Square
armnn::IDeviceSpec
Device specific knowledge to be passed to the optimizer.
Definition: Types.hpp:304
armnn::IDeviceSpec::GetSupportedBackends
virtual const BackendIdSet & GetSupportedBackends() const =0
armnn::PoolingAlgorithm
PoolingAlgorithm
Definition: Types.hpp:151
armnn::EXPIRE_RATE
constexpr unsigned int EXPIRE_RATE
Variable to control expire rate of priority queue.
Definition: Types.hpp:37
armnn::BinaryOperation::Div
@ Div
armnn::OutputShapeRounding::Ceiling
@ Ceiling
armnn::DataType::Signed64
@ Signed64
armnn::LayerType::FirstLayer
@ FirstLayer
armnn::NormalizationAlgorithmChannel
NormalizationAlgorithmChannel
Definition: Types.hpp:208
armnn::IDeviceSpec::IDeviceSpec
IDeviceSpec()
Definition: Types.hpp:307
armnn::LayerType::Activation
@ Activation
armnn::ComparisonOperation::Equal
@ Equal
armnn::ShapeInferenceMethod
ShapeInferenceMethod
The ShapeInferenceMethod modify how the output shapes are treated.
Definition: Types.hpp:236
armnn::IBackendSharedPtr
std::shared_ptr< IBackend > IBackendSharedPtr
Definition: Types.hpp:283
armnn::PermutationVector::PermutationVector
PermutationVector(const ValueType *dimMappings, SizeType numDimMappings)
Definition: Descriptors.cpp:20
armnn::PermutationVector::SizeType
unsigned int SizeType
Definition: Types.hpp:323
armnn::NormalizationAlgorithmMethod::LocalContrast
@ LocalContrast
Jarret 2009: Local Contrast Normalization.
armnn::PaddingMethod
PaddingMethod
The padding method modifies the output of pooling layers.
Definition: Types.hpp:189
armnn::IBackend::~IBackend
virtual ~IBackend()
Definition: Types.hpp:277
armnn::PaddingMode::Reflect
@ Reflect
armnn::LayerType
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:496
armnn::HighResolutionClock
std::chrono::high_resolution_clock::time_point HighResolutionClock
Define a timer and associated inference ID for recording execution times.
Definition: Types.hpp:406
armnn::PaddingMode::Constant
@ Constant
armnn::Status::Failure
@ Failure
armnn::ReduceOperation::Max
@ Max
armnn::DataLayout::NCHW
@ NCHW
armnn::ActivationFunction::Sigmoid
@ Sigmoid
armnn::ComparisonOperation::Greater
@ Greater