From 03c7ff3f6188240baaeaeb405a357a0c58195fec Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 22 Aug 2023 12:00:04 +0100 Subject: IVGCVSW-7702 Update Doxygen Docu for 23.08 Signed-off-by: Nikhil Raj Change-Id: I357a9f7e47614589327c1ac5d95b6224ff77103d --- 23.08/_workload_factory_8hpp_source.html | 225 +++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 23.08/_workload_factory_8hpp_source.html (limited to '23.08/_workload_factory_8hpp_source.html') diff --git a/23.08/_workload_factory_8hpp_source.html b/23.08/_workload_factory_8hpp_source.html new file mode 100644 index 0000000000..d47b029560 --- /dev/null +++ b/23.08/_workload_factory_8hpp_source.html @@ -0,0 +1,225 @@ + + + + + + + + +Arm NN: include/armnn/backends/WorkloadFactory.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.08 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
WorkloadFactory.hpp
+
+
+Go to the documentation of this file.
1 //
+
2 // Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
+
3 // SPDX-License-Identifier: MIT
+
4 //
+
5 #pragma once
+
6 
+
7 #include "ITensorHandle.hpp"
+
8 #include "Workload.hpp"
+
9 
+
10 #include <armnn/Optional.hpp>
+
11 #include <armnn/INetwork.hpp>
+
12 #include <armnn/TensorFwd.hpp>
+
13 
+
14 #include <memory>
+
15 
+
16 namespace armnn
+
17 {
+
18 
+
19 class Layer;
+
20 
+
21 // Workload factory interface for compute backends.
+ +
23 {
+
24 public:
+
25  virtual ~IWorkloadFactory() { }
+
26 
+
27  virtual void AfterWorkloadsCreated() {};
+
28 
+
29  virtual const BackendId& GetBackendId() const = 0;
+
30 
+
31  static bool IsLayerSupported(const BackendId& backendId,
+
32  const IConnectableLayer& layer,
+
33  Optional<DataType> dataType,
+
34  std::string& outReasonIfUnsupported);
+
35 
+
36  static bool IsLayerSupported(const IConnectableLayer& layer,
+
37  Optional<DataType> dataType,
+
38  std::string& outReasonIfUnsupported);
+
39 
+
40  static bool IsLayerSupported(const IConnectableLayer& layer,
+
41  Optional<DataType> dataType,
+
42  std::string& outReasonIfUnsupported,
+
43  const ModelOptions& modelOptions);
+
44 
+
45  static bool IsLayerSupported(const BackendId& backendId,
+
46  const IConnectableLayer& layer,
+
47  Optional<DataType> dataType,
+
48  std::string& outReasonIfUnsupported,
+
49  const ModelOptions& modelOptions);
+
50 
+
51  virtual bool SupportsSubTensors() const = 0;
+
52 
+
53  ARMNN_DEPRECATED_MSG("Use ITensorHandleFactory::CreateSubTensorHandle instead")
+
54  virtual std::unique_ptr<ITensorHandle> CreateSubTensorHandle(ITensorHandle& parent,
+
55  TensorShape const& subTensorShape,
+
56  unsigned int const* subTensorOrigin
+
57  ) const = 0;
+
58 
+ +
60  virtual std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
+
61  const bool IsMemoryManaged = true) const = 0;
+
62 
+ +
64  virtual std::unique_ptr<ITensorHandle> CreateTensorHandle(const TensorInfo& tensorInfo,
+
65  DataLayout dataLayout,
+
66  const bool IsMemoryManaged = true) const = 0;
+
67 
+
68  /// Backends should implement their own CreateWorkload function with a switch statement.
+
69  /// The case for the switch should be the LayerType and based on that they will call their
+
70  /// specific workload creation functionality.
+
71  virtual std::unique_ptr<IWorkload> CreateWorkload(LayerType type,
+
72  const QueueDescriptor& descriptor,
+
73  const WorkloadInfo& info) const = 0;
+
74 
+
75 private:
+
76  static bool IsLayerConfigurationSupported(const BackendId& backendId,
+
77  const IConnectableLayer& connectableLayer,
+
78  Optional<DataType> dataType,
+
79  std::string& outReasonIfUnsupported,
+
80  const ModelOptions& modelOptions = {});
+
81 };
+
82 
+
83 } // namespace armnn
+
+
+ +
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
+
DataLayout
Definition: Types.hpp:62
+ +
Workload interface to enqueue a layer computation.
Definition: IWorkload.hpp:23
+ +
virtual const BackendId & GetBackendId() const =0
+
virtual std::unique_ptr< ITensorHandle > CreateSubTensorHandle(ITensorHandle &parent, TensorShape const &subTensorShape, unsigned int const *subTensorOrigin) const =0
+ + + + + + +
Contains information about TensorInfos of a layer.
+
DataType
Definition: Types.hpp:48
+ +
virtual bool SupportsSubTensors() const =0
+ + + +
static bool IsLayerSupported(const BackendId &backendId, const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
+
#define ARMNN_DEPRECATED_MSG(message)
Definition: Deprecated.hpp:43
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:80
+
std::vector< BackendOptions > ModelOptions
+
virtual void AfterWorkloadsCreated()
+
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:483
+
virtual std::unique_ptr< IWorkload > CreateWorkload(LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const =0
Backends should implement their own CreateWorkload function with a switch statement.
+ + + + -- cgit v1.2.1