ArmNN
 24.02
Types.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2018-2023 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 };
149 
151 {
152  Max = 0,
153  Average = 1,
154  L2 = 2
155 };
156 
157 enum class ReduceOperation
158 {
159  Sum = 0,
160  Max = 1,
161  Mean = 2,
162  Min = 3,
163  Prod = 4
164 };
165 
166 enum class ResizeMethod
167 {
168  Bilinear = 0,
169  NearestNeighbor = 1
170 };
171 
172 enum class Dimensionality
173 {
174  NotSpecified = 0,
175  Specified = 1,
176  Scalar = 2
177 };
178 
179 ///
180 /// The padding method modifies the output of pooling layers.
181 /// In both supported methods, the values are ignored (they are
182 /// not even zeroes, which would make a difference for max pooling
183 /// a tensor with negative values). The difference between
184 /// IgnoreValue and Exclude is that the former counts the padding
185 /// fields in the divisor of Average and L2 pooling, while
186 /// Exclude does not.
187 ///
188 enum class PaddingMethod
189 {
190  /// The padding fields count, but are ignored
191  IgnoreValue = 0,
192  /// The padding fields don't count and are ignored
193  Exclude = 1
194 };
195 
196 ///
197 /// The padding mode controls whether the padding should be filled with constant values (Constant), or
198 /// reflect the input, either including the border values (Symmetric) or not (Reflect).
199 ///
200 enum class PaddingMode
201 {
202  Constant = 0,
203  Reflect = 1,
204  Symmetric = 2
205 };
206 
208 {
209  Across = 0,
210  Within = 1
211 };
212 
214 {
215  /// Krichevsky 2012: Local Brightness Normalization
216  LocalBrightness = 0,
217  /// Jarret 2009: Local Contrast Normalization
218  LocalContrast = 1
219 };
220 
222 {
223  Floor = 0,
224  Ceiling = 1
225 };
226 
227 ///
228 /// The ShapeInferenceMethod modify how the output shapes are treated.
229 /// When ValidateOnly is selected, the output shapes are inferred from the input parameters of the layer
230 /// and any mismatch is reported.
231 /// When InferAndValidate is selected 2 actions are performed: (1)infer output shape from inputs and (2)validate the
232 /// shapes as in ValidateOnly. This option has been added to work with tensors which rank or dimension sizes are not
233 /// specified explicitly, however this information can be calculated from the inputs.
234 ///
236 {
237  /// Validate all output shapes
238  ValidateOnly = 0,
239  /// Infer missing output shapes and validate all output shapes
240  InferAndValidate = 1
241 };
242 
243 /// Define the Memory Source to reduce copies
244 enum class MemorySource : uint32_t
245 {
246  Undefined = 0,
247  Malloc = 1,
248  DmaBuf = 2,
249  DmaBufProtected = 4,
250  Gralloc = 8
251 };
252 
254 {
255  // MemBlocks can be packed on the Y axis only, overlap allowed on X axis.
256  // In other words MemBlocks with overlapping lifetimes cannot use the same MemBin,
257  // equivalent to blob or pooling memory management.
258  SingleAxisPacking = 0,
259 
260  // MemBlocks can be packed on either Y or X axis but cannot overlap on both.
261  // In other words MemBlocks with overlapping lifetimes can use the same MemBin,
262  // equivalent to offset or slab memory management.
263  MultiAxisPacking = 1
264 };
265 
266 enum class FusedKernelType
267 {
268  AddMulAdd = 0
269 };
270 
271 /// Each backend should implement an IBackend.
272 class IBackend
273 {
274 protected:
275  IBackend() {}
276  virtual ~IBackend() {}
277 
278 public:
279  virtual const BackendId& GetId() const = 0;
280 };
281 
282 using IBackendSharedPtr = std::shared_ptr<IBackend>;
283 using IBackendUniquePtr = std::unique_ptr<IBackend, void(*)(IBackend* backend)>;
284 
285 /// BackendCapability class
286 enum class BackendCapability : uint32_t
287 {
288  /// Constant weights can be accessed through the descriptors,
289  /// On the other hand, non-const weights can be accessed through inputs.
291 
292  /// Asynchronous Execution.
294 
295  // add new enum values here
296 };
297 
298 /// Device specific knowledge to be passed to the optimizer.
300 {
301 protected:
303  virtual ~IDeviceSpec() {}
304 public:
305  virtual const BackendIdSet& GetSupportedBackends() const = 0;
306 };
307 
308 /// Type of identifiers for bindable layers (inputs, outputs).
309 using LayerBindingId = int;
310 using ImportedInputId = unsigned int;
311 using ImportedOutputId = unsigned int;
312 
313 
315 {
316 public:
317  using ValueType = unsigned int;
318  using SizeType = unsigned int;
319  using ArrayType = std::array<ValueType, MaxNumOfTensorDimensions>;
320  using ConstIterator = typename ArrayType::const_iterator;
321 
322  /// @param dimMappings - Indicates how to translate tensor elements from a given source into the target destination,
323  /// when source and target potentially have different memory layouts.
324  ///
325  /// E.g. For a 4-d tensor laid out in a memory with the format (Batch Element, Height, Width, Channels),
326  /// which is to be passed as an input to ArmNN, each source dimension is mapped to the corresponding
327  /// ArmNN dimension. The Batch dimension remains the same (0 -> 0). The source Height dimension is mapped
328  /// to the location of the ArmNN Height dimension (1 -> 2). Similar arguments are made for the Width and
329  /// Channels (2 -> 3 and 3 -> 1). This will lead to @ref m_DimMappings pointing to the following array:
330  /// [ 0, 2, 3, 1 ].
331  ///
332  /// Note that the mapping should be reversed if considering the case of ArmNN 4-d outputs (Batch Element,
333  /// Channels, Height, Width) being written to a destination with the format mentioned above. We now have
334  /// 0 -> 0, 2 -> 1, 3 -> 2, 1 -> 3, which, when reordered, lead to the following @ref m_DimMappings contents:
335  /// [ 0, 3, 1, 2 ].
336  ///
337  PermutationVector(const ValueType *dimMappings, SizeType numDimMappings);
338 
339  PermutationVector(std::initializer_list<ValueType> dimMappings);
340 
341  ///
342  /// Indexing method with out-of-bounds error checking for the m_DimMappings array.
343  /// @param i - integer value corresponding to index of m_DimMappings array to retrieve element from.
344  /// @return element at index i of m_DimMappings array.
345  /// @throws InvalidArgumentException when indexing out-of-bounds index of m_DimMappings array.
346  ///
348  {
349  if (i >= GetSize())
350  {
351  throw InvalidArgumentException("Invalid indexing of PermutationVector of size " + std::to_string(GetSize())
352  + " at location [" + std::to_string(i) + "].");
353  }
354  return m_DimMappings.at(i);
355  }
356 
357  SizeType GetSize() const { return m_NumDimMappings; }
358 
359  ConstIterator begin() const { return m_DimMappings.begin(); }
360  /**
361  *
362  * @return pointer one past the end of the number of mapping not the length of m_DimMappings.
363  */
364  ConstIterator end() const { return m_DimMappings.begin() + m_NumDimMappings; }
365 
366  bool IsEqual(const PermutationVector& other) const
367  {
368  if (m_NumDimMappings != other.m_NumDimMappings) return false;
369  for (unsigned int i = 0; i < m_NumDimMappings; ++i)
370  {
371  if (m_DimMappings[i] != other.m_DimMappings[i]) return false;
372  }
373  return true;
374  }
375 
376  bool IsInverse(const PermutationVector& other) const
377  {
378  bool isInverse = (GetSize() == other.GetSize());
379  for (SizeType i = 0; isInverse && (i < GetSize()); ++i)
380  {
381  isInverse = (m_DimMappings[other.m_DimMappings[i]] == i);
382  }
383  return isInverse;
384  }
385 
386 private:
387  ArrayType m_DimMappings;
388  /// Number of valid entries in @ref m_DimMappings
389  SizeType m_NumDimMappings;
390 };
391 
392 class ITensorHandle;
393 
394 /// Define the type of callback for the Debug layer to call
395 /// @param guid - guid of layer connected to the input of the Debug layer
396 /// @param slotIndex - index of the output slot connected to the input of the Debug layer
397 /// @param tensorHandle - TensorHandle for the input tensor to the Debug layer
398 using DebugCallbackFunction = std::function<void(LayerGuid guid, unsigned int slotIndex, ITensorHandle* tensorHandle)>;
399 
400 /// Define a timer and associated inference ID for recording execution times
401 using HighResolutionClock = std::chrono::high_resolution_clock::time_point;
402 using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>;
403 
404 
405 /// This list uses X macro technique.
406 /// See https://en.wikipedia.org/wiki/X_Macro for more info
407 // New layers should be added at last position to minimize instability.
408 #define LIST_OF_LAYER_TYPE \
409  X(Activation) \
410  X(Addition) \
411  X(ArgMinMax) \
412  X(BatchNormalization) \
413  X(BatchToSpaceNd) \
414  X(Comparison) \
415  X(Concat) \
416  X(Constant) \
417  X(ConvertFp16ToFp32) \
418  X(ConvertFp32ToFp16) \
419  X(Convolution2d) \
420  X(Debug) \
421  X(DepthToSpace) \
422  X(DepthwiseConvolution2d) \
423  X(Dequantize) \
424  X(DetectionPostProcess) \
425  X(Division) \
426  X(ElementwiseUnary) \
427  X(FakeQuantization) \
428  X(Fill) \
429  X(Floor) \
430  X(FullyConnected) \
431  X(Gather) \
432  X(Input) \
433  X(InstanceNormalization) \
434  X(L2Normalization) \
435  X(LogicalBinary) \
436  X(LogSoftmax) \
437  X(Lstm) \
438  X(QLstm) \
439  X(Map) \
440  X(Maximum) \
441  X(Mean) \
442  X(MemCopy) \
443  X(MemImport) \
444  X(Merge) \
445  X(Minimum) \
446  X(Multiplication) \
447  X(Normalization) \
448  X(Output) \
449  X(Pad) \
450  X(Permute) \
451  X(Pooling2d) \
452  X(PreCompiled) \
453  X(Prelu) \
454  X(Quantize) \
455  X(QuantizedLstm) \
456  X(Reshape) \
457  X(Rank) \
458  X(Resize) \
459  X(Reduce) \
460  X(Slice) \
461  X(Softmax) \
462  X(SpaceToBatchNd) \
463  X(SpaceToDepth) \
464  X(Splitter) \
465  X(Stack) \
466  X(StandIn) \
467  X(StridedSlice) \
468  X(Subtraction) \
469  X(Switch) \
470  X(Transpose) \
471  X(TransposeConvolution2d) \
472  X(Unmap) \
473  X(Cast) \
474  X(Shape) \
475  X(UnidirectionalSequenceLstm) \
476  X(ChannelShuffle) \
477  X(Convolution3d) \
478  X(Pooling3d) \
479  X(GatherNd) \
480  X(BatchMatMul) \
481  X(ElementwiseBinary) \
482  X(ReverseV2) \
483  X(Tile) \
484  X(Fused) \
485  X(BroadcastTo) \
486 
487 // New layers should be added at last position to minimize instability.
488 
489 /// When adding a new layer, adapt also the LastLayer enum value in the
490 /// enum class LayerType below
491 enum class LayerType
492 {
493 #define X(name) name,
495 #undef X
498 };
499 
500 const char* GetLayerTypeAsCString(LayerType type);
501 
502 } // 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:366
armnn::ImportedInputId
unsigned int ImportedInputId
Definition: Types.hpp:310
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:376
arm
Definition: BackendRegistry.hpp:15
armnn::ComparisonOperation::LessOrEqual
@ LessOrEqual
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:166
armnn::DataLayout
DataLayout
Definition: Types.hpp:62
armnn::InferenceTimingPair
std::pair< HighResolutionClock, HighResolutionClock > InferenceTimingPair
Definition: Types.hpp:402
armnn::QosExecPriority::Medium
@ Medium
armnn::PermutationVector::ArrayType
std::array< ValueType, MaxNumOfTensorDimensions > ArrayType
Definition: Types.hpp:319
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:283
armnn::ActivationFunction::Sqrt
@ Sqrt
armnn::OutputShapeRounding
OutputShapeRounding
Definition: Types.hpp:221
armnn::MemorySource::DmaBufProtected
@ DmaBufProtected
armnn::NormalizationAlgorithmMethod::LocalBrightness
@ LocalBrightness
Krichevsky 2012: Local Brightness Normalization.
armnn::IBackend::IBackend
IBackend()
Definition: Types.hpp:275
armnn::NormalizationAlgorithmMethod
NormalizationAlgorithmMethod
Definition: Types.hpp:213
armnn::BinaryOperation::Sub
@ Sub
armnn::BackendCapability
BackendCapability
BackendCapability class.
Definition: Types.hpp:286
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:200
armnn::PermutationVector::operator[]
ValueType operator[](SizeType i) const
Indexing method with out-of-bounds error checking for the m_DimMappings array.
Definition: Types.hpp:347
armnn::MaxNumOfTensorDimensions
constexpr unsigned int MaxNumOfTensorDimensions
Definition: Types.hpp:31
armnn::PermutationVector::begin
ConstIterator begin() const
Definition: Types.hpp:359
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:364
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::Dimensionality
Dimensionality
Definition: Types.hpp:172
armnn::IDeviceSpec::~IDeviceSpec
virtual ~IDeviceSpec()
Definition: Types.hpp:303
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::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:309
armnn::ActivationFunction::Linear
@ Linear
armnn::ProfilingDetailsMethod
ProfilingDetailsMethod
Define the behaviour of the internal profiler when outputting network details.
Definition: Types.hpp:71
armnn::MemBlockStrategyType
MemBlockStrategyType
Definition: Types.hpp:253
armnn::ReduceOperation::Sum
@ Sum
armnn::MemBlockStrategyType::SingleAxisPacking
@ SingleAxisPacking
armnn::PermutationVector
Definition: Types.hpp:314
armnn::Status::Success
@ Success
armnn::IBackend
Each backend should implement an IBackend.
Definition: Types.hpp:272
armnn::Dimensionality::NotSpecified
@ NotSpecified
armnn::LayerType::BroadcastTo
@ BroadcastTo
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:311
armnn::DataType::QAsymmS8
@ QAsymmS8
armnn::ResizeMethod::Bilinear
@ Bilinear
armnn::ArgMinMaxFunction::Min
@ Min
armnn::LayerType::LastLayer
@ LastLayer
armnn::FusedKernelType
FusedKernelType
Definition: Types.hpp:266
armnn::UnaryOperation::Log
@ Log
armnn::LogicalBinaryOperation::LogicalAnd
@ LogicalAnd
armnn::PermutationVector::GetSize
SizeType GetSize() const
Definition: Types.hpp:357
armnn::PermutationVector::ConstIterator
typename ArrayType::const_iterator ConstIterator
Definition: Types.hpp:320
armnn::ComparisonOperation
ComparisonOperation
Definition: Types.hpp:109
armnn::Dimensionality::Specified
@ Specified
armnn::Status
Status
Definition: Types.hpp:42
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:398
armnn::MemorySource
MemorySource
Define the Memory Source to reduce copies.
Definition: Types.hpp:244
LIST_OF_LAYER_TYPE
#define LIST_OF_LAYER_TYPE
This list uses X macro technique.
Definition: Types.hpp:408
armnn::BackendId
Definition: BackendId.hpp:75
armnn::BinaryOperation::Minimum
@ Minimum
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:317
armnn::PoolingAlgorithm::Max
@ Max
armnn::ReduceOperation
ReduceOperation
Definition: Types.hpp:157
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:299
armnn::IDeviceSpec::GetSupportedBackends
virtual const BackendIdSet & GetSupportedBackends() const =0
armnn::PoolingAlgorithm
PoolingAlgorithm
Definition: Types.hpp:150
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:207
armnn::IDeviceSpec::IDeviceSpec
IDeviceSpec()
Definition: Types.hpp:302
armnn::LayerType::Activation
@ Activation
armnn::ComparisonOperation::Equal
@ Equal
armnn::ShapeInferenceMethod
ShapeInferenceMethod
The ShapeInferenceMethod modify how the output shapes are treated.
Definition: Types.hpp:235
armnn::IBackendSharedPtr
std::shared_ptr< IBackend > IBackendSharedPtr
Definition: Types.hpp:282
armnn::PermutationVector::PermutationVector
PermutationVector(const ValueType *dimMappings, SizeType numDimMappings)
Definition: Descriptors.cpp:20
armnn::PermutationVector::SizeType
unsigned int SizeType
Definition: Types.hpp:318
armnn::NormalizationAlgorithmMethod::LocalContrast
@ LocalContrast
Jarret 2009: Local Contrast Normalization.
armnn::PaddingMethod
PaddingMethod
The padding method modifies the output of pooling layers.
Definition: Types.hpp:188
armnn::IBackend::~IBackend
virtual ~IBackend()
Definition: Types.hpp:276
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:491
armnn::HighResolutionClock
std::chrono::high_resolution_clock::time_point HighResolutionClock
Define a timer and associated inference ID for recording execution times.
Definition: Types.hpp:401
armnn::PaddingMode::Constant
@ Constant
armnn::Status::Failure
@ Failure
armnn::ReduceOperation::Max
@ Max
armnn::DataLayout::NCHW
@ NCHW
armnn::ActivationFunction::Sigmoid
@ Sigmoid
armnn::ComparisonOperation::Greater
@ Greater