Laurent Carlier | 749294b | 2020-06-01 09:03:17 +0100 | [diff] [blame] | 1 | // |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 4 | // |
| 5 | #pragma once |
| 6 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 7 | #include <armnn/backends/TensorHandleFwd.hpp> |
Matteo Martincigh | e5b8eb9 | 2019-11-28 15:45:42 +0000 | [diff] [blame] | 8 | #include <armnn/backends/ITensorHandle.hpp> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 9 | |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 10 | #include <InternalTypes.hpp> |
| 11 | |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 12 | #include <armnn/Deprecated.hpp> |
David Beck | 0dbe0ee | 2018-09-24 15:59:27 +0100 | [diff] [blame] | 13 | #include <armnn/Descriptors.hpp> |
| 14 | #include <armnn/Exceptions.hpp> |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 15 | #include <armnn/Types.hpp> |
| 16 | #include <armnn/Tensor.hpp> |
David Beck | 0dbe0ee | 2018-09-24 15:59:27 +0100 | [diff] [blame] | 17 | |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 18 | #include <backendsCommon/WorkloadInfo.hpp> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 19 | |
| 20 | namespace armnn |
| 21 | { |
| 22 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 23 | //A helper function that returns the bias data type required for given input data type. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 24 | DataType GetBiasDataType(DataType inputDataType); |
| 25 | |
| 26 | struct WorkloadInfo; |
| 27 | |
| 28 | struct QueueDescriptor |
| 29 | { |
| 30 | std::vector<ITensorHandle*> m_Inputs; |
| 31 | std::vector<ITensorHandle*> m_Outputs; |
Keith Davis | df04d23 | 2020-10-23 17:20:05 +0100 | [diff] [blame] | 32 | void* m_AdditionalInfoObject; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 33 | |
| 34 | void ValidateInputsOutputs(const std::string& descName, |
Narumol Prangnawarat | 867eba5 | 2020-02-03 12:29:56 +0000 | [diff] [blame] | 35 | unsigned int numExpectedIn, |
| 36 | unsigned int numExpectedOut) const; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 37 | |
Keith Davis | df04d23 | 2020-10-23 17:20:05 +0100 | [diff] [blame] | 38 | template<typename T> |
Mike Kelly | 07810fc | 2020-11-12 10:58:48 +0000 | [diff] [blame] | 39 | const T* GetAdditionalInformation() const |
Keith Davis | df04d23 | 2020-10-23 17:20:05 +0100 | [diff] [blame] | 40 | { |
| 41 | return static_cast<T*>(m_AdditionalInfoObject); |
| 42 | } |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 43 | |
| 44 | protected: |
| 45 | ~QueueDescriptor() = default; |
Keith Davis | df04d23 | 2020-10-23 17:20:05 +0100 | [diff] [blame] | 46 | QueueDescriptor() |
| 47 | : m_AdditionalInfoObject(nullptr) |
| 48 | {} |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 49 | QueueDescriptor(QueueDescriptor const&) = default; |
| 50 | QueueDescriptor& operator=(QueueDescriptor const&) = default; |
| 51 | }; |
| 52 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 53 | // Base class for queue descriptors which contain parameters. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 54 | template <typename LayerDescriptor> |
| 55 | struct QueueDescriptorWithParameters : public QueueDescriptor |
| 56 | { |
| 57 | LayerDescriptor m_Parameters; |
| 58 | |
| 59 | protected: |
| 60 | ~QueueDescriptorWithParameters() = default; |
| 61 | QueueDescriptorWithParameters() = default; |
| 62 | QueueDescriptorWithParameters(QueueDescriptorWithParameters const&) = default; |
| 63 | QueueDescriptorWithParameters& operator=(QueueDescriptorWithParameters const&) = default; |
| 64 | }; |
| 65 | |
Jim Flynn | 68db06f | 2020-10-06 10:14:50 +0100 | [diff] [blame] | 66 | struct MapQueueDescriptor : QueueDescriptor |
| 67 | { |
| 68 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 69 | }; |
| 70 | |
Jim Flynn | 3a40ea5 | 2020-10-08 11:42:30 +0100 | [diff] [blame] | 71 | struct UnmapQueueDescriptor : QueueDescriptor |
| 72 | { |
| 73 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 74 | }; |
| 75 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 76 | struct MemCopyQueueDescriptor : QueueDescriptor |
| 77 | { |
| 78 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 79 | }; |
| 80 | |
| 81 | using InputQueueDescriptor = MemCopyQueueDescriptor; |
| 82 | using OutputQueueDescriptor = MemCopyQueueDescriptor; |
| 83 | |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 84 | struct MemImportQueueDescriptor : QueueDescriptor |
| 85 | { |
| 86 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 87 | }; |
| 88 | |
| 89 | struct MemSyncQueueDescriptor : QueueDescriptor |
| 90 | { |
| 91 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 92 | }; |
| 93 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 94 | // Softmax layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 95 | struct SoftmaxQueueDescriptor : QueueDescriptorWithParameters<SoftmaxDescriptor> |
| 96 | { |
| 97 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 98 | }; |
| 99 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 100 | // Splitter layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 101 | struct SplitterQueueDescriptor : QueueDescriptorWithParameters<ViewsDescriptor> |
| 102 | { |
| 103 | struct ViewOrigin |
| 104 | { |
| 105 | ViewOrigin() {} |
| 106 | ViewOrigin(std::vector<unsigned int> const& origin) : m_Origin(origin) {} |
| 107 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 108 | //View origin (size of the vector is the same as number of dimensions of the view). |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 109 | std::vector<unsigned int> m_Origin; |
| 110 | }; |
| 111 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 112 | //View defines a tensor that will be carved from the input tensor. |
| 113 | //View origins are stored here, the extents are defined by sizes of the output tensors. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 114 | std::vector<ViewOrigin> m_ViewOrigins; |
| 115 | |
| 116 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 117 | }; |
| 118 | |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 119 | // Concat layer workload data. |
| 120 | struct ConcatQueueDescriptor : QueueDescriptorWithParameters<OriginsDescriptor> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 121 | { |
| 122 | struct ViewOrigin |
| 123 | { |
| 124 | ViewOrigin() {} |
| 125 | ViewOrigin(const std::vector<unsigned int>& origin) : m_Origin(origin) {} |
| 126 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 127 | //View origin (size of the vector is the same as number of dimensions of the view). |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 128 | std::vector<unsigned int> m_Origin; |
| 129 | }; |
| 130 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 131 | //View defines a sub-area of the output tensor that will be filled with the corresponding input tensor. |
| 132 | //View origins are stored here, the extents are defined by sizes of the input tensors. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 133 | std::vector<ViewOrigin> m_ViewOrigins; |
| 134 | |
| 135 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 136 | }; |
| 137 | |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 138 | // Deprecated. Use ConcatQueueDescriptor instead |
| 139 | using MergerQueueDescriptor = ConcatQueueDescriptor; |
| 140 | |
Matthew Jackson | 2b8c1da | 2019-07-04 14:59:16 +0100 | [diff] [blame] | 141 | // Stack layer workload data. |
| 142 | struct StackQueueDescriptor : QueueDescriptorWithParameters<StackDescriptor> |
| 143 | { |
| 144 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 145 | }; |
| 146 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 147 | // Activation layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 148 | struct ActivationQueueDescriptor : QueueDescriptorWithParameters<ActivationDescriptor> |
| 149 | { |
| 150 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 151 | }; |
| 152 | |
Nikhil Raj | ee391d5 | 2019-09-05 17:50:44 +0100 | [diff] [blame] | 153 | struct ArgMinMaxQueueDescriptor : QueueDescriptorWithParameters<ArgMinMaxDescriptor> |
| 154 | { |
| 155 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 156 | }; |
| 157 | |
mathad01 | b392e98 | 2021-04-07 12:07:30 +0100 | [diff] [blame] | 158 | struct CastQueueDescriptor : QueueDescriptor |
| 159 | { |
| 160 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 161 | }; |
| 162 | |
Ryan OShea | ec6c680 | 2020-06-05 17:17:06 +0100 | [diff] [blame] | 163 | // Fill layer workload data. |
| 164 | struct FillQueueDescriptor : QueueDescriptorWithParameters<FillDescriptor> |
| 165 | { |
Ryan OShea | ec6c680 | 2020-06-05 17:17:06 +0100 | [diff] [blame] | 166 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 167 | }; |
| 168 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 169 | // Fully connected layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 170 | struct FullyConnectedQueueDescriptor : QueueDescriptorWithParameters<FullyConnectedDescriptor> |
| 171 | { |
| 172 | FullyConnectedQueueDescriptor() |
| 173 | : m_Weight(nullptr) |
| 174 | , m_Bias(nullptr) |
| 175 | { |
| 176 | } |
| 177 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 178 | const ConstTensorHandle* m_Weight; |
| 179 | const ConstTensorHandle* m_Bias; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 180 | |
| 181 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 182 | }; |
| 183 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 184 | // Permute layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 185 | struct PermuteQueueDescriptor : QueueDescriptorWithParameters<PermuteDescriptor> |
| 186 | { |
| 187 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 188 | }; |
| 189 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 190 | // Pooling 2D layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 191 | struct Pooling2dQueueDescriptor : QueueDescriptorWithParameters<Pooling2dDescriptor> |
| 192 | { |
| 193 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 194 | }; |
| 195 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 196 | // Convolution 2D layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 197 | struct Convolution2dQueueDescriptor : QueueDescriptorWithParameters<Convolution2dDescriptor> |
| 198 | { |
| 199 | Convolution2dQueueDescriptor() |
| 200 | : m_Weight(nullptr) |
| 201 | , m_Bias(nullptr) |
| 202 | { |
| 203 | } |
| 204 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 205 | const ConstTensorHandle* m_Weight; |
| 206 | const ConstTensorHandle* m_Bias; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 207 | |
| 208 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 209 | }; |
| 210 | |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 211 | // Convolution 2D layer workload data. |
| 212 | struct Convolution3dQueueDescriptor : QueueDescriptorWithParameters<Convolution3dDescriptor> |
| 213 | { |
| 214 | Convolution3dQueueDescriptor() |
| 215 | : m_Weight(nullptr) |
| 216 | , m_Bias(nullptr) |
| 217 | { |
| 218 | } |
| 219 | |
| 220 | const ConstTensorHandle* m_Weight; |
| 221 | const ConstTensorHandle* m_Bias; |
| 222 | |
| 223 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 224 | }; |
| 225 | |
Jan Eilers | 53ef795 | 2021-06-02 12:01:25 +0100 | [diff] [blame] | 226 | /// Depthwise Convolution 2D layer workload data. |
| 227 | /// |
| 228 | /// @note |
| 229 | /// The weights are in the format [1, H, W, I*M]. Where I is the input channel size, M the depthwise mutliplier and |
| 230 | /// H, W is the height and width of the filter kernel. If per channel quantization is applied |
| 231 | /// the weights will be quantized along the last dimension/axis (I*M) which corresponds to the output channel size. |
| 232 | /// If per channel quantization is applied the weights tensor will have I*M scales, one for each dimension |
| 233 | /// of the quantization axis. You have to be aware of this when reshaping the weights tensor. |
| 234 | /// Splitting the I*M axis, e.g. [1, H, W, I*M] --> [H, W, I, M], won't work without taking care of the |
| 235 | /// corresponding quantization scales. |
| 236 | /// If there is no per channel quantization applied reshaping the weights tensor won't cause any issues. There are |
| 237 | /// preconfigured permutation functions available @link WorkloadUtils.hpp here. |
| 238 | /// |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 239 | struct DepthwiseConvolution2dQueueDescriptor : QueueDescriptorWithParameters<DepthwiseConvolution2dDescriptor> |
| 240 | { |
| 241 | DepthwiseConvolution2dQueueDescriptor() |
| 242 | : m_Weight(nullptr) |
| 243 | , m_Bias(nullptr) |
| 244 | { |
| 245 | } |
| 246 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 247 | const ConstTensorHandle* m_Weight; |
| 248 | const ConstTensorHandle* m_Bias; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 249 | |
| 250 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 251 | }; |
| 252 | |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 253 | struct DetectionPostProcessQueueDescriptor : QueueDescriptorWithParameters<DetectionPostProcessDescriptor> |
| 254 | { |
Narumol Prangnawarat | bc67cef | 2019-01-31 15:31:54 +0000 | [diff] [blame] | 255 | DetectionPostProcessQueueDescriptor() |
| 256 | : m_Anchors(nullptr) |
| 257 | { |
| 258 | } |
| 259 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 260 | const ConstTensorHandle* m_Anchors; |
Narumol Prangnawarat | bc67cef | 2019-01-31 15:31:54 +0000 | [diff] [blame] | 261 | |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 262 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 263 | }; |
| 264 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 265 | // Normalization layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 266 | struct NormalizationQueueDescriptor : QueueDescriptorWithParameters<NormalizationDescriptor> |
| 267 | { |
| 268 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 269 | }; |
| 270 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 271 | // Add layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 272 | struct AdditionQueueDescriptor : QueueDescriptor |
| 273 | { |
| 274 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 275 | }; |
| 276 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 277 | // Multiplication layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 278 | struct MultiplicationQueueDescriptor : QueueDescriptor |
| 279 | { |
| 280 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 281 | }; |
| 282 | |
Francis Murtagh | e7a86a4 | 2018-08-29 12:42:10 +0100 | [diff] [blame] | 283 | // Division layer workload data. |
| 284 | struct DivisionQueueDescriptor : QueueDescriptor |
| 285 | { |
| 286 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 287 | }; |
| 288 | |
David Beck | c2044fe | 2018-09-05 15:00:38 +0100 | [diff] [blame] | 289 | // Subtraction layer workload data. |
| 290 | struct SubtractionQueueDescriptor : QueueDescriptor |
| 291 | { |
| 292 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 293 | }; |
| 294 | |
Nattapat Chaimanowong | 5a4304a | 2018-11-28 10:44:37 +0000 | [diff] [blame] | 295 | // Maximum layer workload data. |
| 296 | struct MaximumQueueDescriptor : QueueDescriptor |
| 297 | { |
| 298 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 299 | }; |
| 300 | |
narpra01 | a6bf912 | 2018-09-10 09:50:09 +0100 | [diff] [blame] | 301 | // Mean layer workload data. |
narpra01 | 32b9046 | 2018-09-13 11:07:48 +0100 | [diff] [blame] | 302 | struct MeanQueueDescriptor : QueueDescriptorWithParameters<MeanDescriptor> |
narpra01 | a6bf912 | 2018-09-10 09:50:09 +0100 | [diff] [blame] | 303 | { |
| 304 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 305 | }; |
| 306 | |
jimfly01 | 2c9322a | 2018-09-19 10:59:49 +0100 | [diff] [blame] | 307 | // Pad layer workload data |
| 308 | struct PadQueueDescriptor : QueueDescriptorWithParameters<PadDescriptor> |
| 309 | { |
| 310 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 311 | }; |
| 312 | |
Derek Lamberti | a9cca6a | 2019-03-25 15:41:58 +0000 | [diff] [blame] | 313 | struct QuantizeQueueDescriptor : QueueDescriptor |
| 314 | { |
| 315 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 316 | }; |
| 317 | |
Teresa Charlin | cedd34f | 2020-03-30 11:17:30 +0100 | [diff] [blame] | 318 | // Deprecated use ComparisonQueueDescriptor instead |
FrancisMurtagh | 2099595 | 2018-12-17 12:11:36 +0000 | [diff] [blame] | 319 | struct EqualQueueDescriptor : QueueDescriptor |
| 320 | { |
| 321 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 322 | }; |
| 323 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 324 | // Batch norm layer workload data. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 325 | struct BatchNormalizationQueueDescriptor : QueueDescriptorWithParameters<BatchNormalizationDescriptor> |
| 326 | { |
| 327 | BatchNormalizationQueueDescriptor() |
| 328 | : m_Mean(nullptr) |
| 329 | , m_Variance(nullptr) |
| 330 | , m_Beta(nullptr) |
| 331 | , m_Gamma(nullptr) |
| 332 | { |
| 333 | } |
| 334 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 335 | const ConstTensorHandle* m_Mean; |
| 336 | const ConstTensorHandle* m_Variance; |
| 337 | const ConstTensorHandle* m_Beta; |
| 338 | const ConstTensorHandle* m_Gamma; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 339 | |
| 340 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 341 | }; |
| 342 | |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 343 | struct RankQueueDescriptor : QueueDescriptor |
| 344 | { |
| 345 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 346 | }; |
| 347 | |
Jan Eilers | 1b2654f | 2021-09-24 15:45:46 +0100 | [diff] [blame] | 348 | ARMNN_NO_DEPRECATE_WARN_BEGIN |
| 349 | struct |
| 350 | ARMNN_DEPRECATED_MSG_REMOVAL_DATE("ResizeBilinearQueueDescriptor is deprecated use ResizeQueueDescriptor instead", |
| 351 | "22.08") |
| 352 | ResizeBilinearQueueDescriptor : QueueDescriptorWithParameters<ResizeBilinearDescriptor> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 353 | { |
| 354 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 355 | }; |
Jan Eilers | 1b2654f | 2021-09-24 15:45:46 +0100 | [diff] [blame] | 356 | ARMNN_NO_DEPRECATE_WARN_END |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 357 | |
Teresa Charlin | a9075df | 2019-06-27 15:41:57 +0100 | [diff] [blame] | 358 | struct ResizeQueueDescriptor : QueueDescriptorWithParameters<ResizeDescriptor> |
| 359 | { |
| 360 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 361 | }; |
| 362 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 363 | struct FakeQuantizationQueueDescriptor : QueueDescriptorWithParameters<FakeQuantizationDescriptor> |
| 364 | { |
| 365 | FakeQuantizationQueueDescriptor() |
| 366 | : m_Min(nullptr) |
| 367 | , m_Max(nullptr) |
| 368 | { |
| 369 | } |
| 370 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 371 | const ConstTensorHandle* m_Min; |
| 372 | const ConstTensorHandle* m_Max; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 373 | |
| 374 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 375 | }; |
| 376 | |
Kevin May | ce5045a | 2019-10-02 14:07:47 +0100 | [diff] [blame] | 377 | struct InstanceNormalizationQueueDescriptor : QueueDescriptorWithParameters<InstanceNormalizationDescriptor> |
| 378 | { |
Kevin May | ce5045a | 2019-10-02 14:07:47 +0100 | [diff] [blame] | 379 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 380 | }; |
| 381 | |
Matteo Martincigh | bcd3c85 | 2018-09-28 14:14:12 +0100 | [diff] [blame] | 382 | struct L2NormalizationQueueDescriptor : QueueDescriptorWithParameters<L2NormalizationDescriptor> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 383 | { |
| 384 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 385 | }; |
| 386 | |
Aron Virginas-Tar | f982dea | 2019-10-11 14:07:53 +0100 | [diff] [blame] | 387 | struct LogSoftmaxQueueDescriptor : QueueDescriptorWithParameters<LogSoftmaxDescriptor> |
| 388 | { |
| 389 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 390 | }; |
| 391 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 392 | struct ConstantQueueDescriptor : QueueDescriptor |
| 393 | { |
| 394 | ConstantQueueDescriptor() |
| 395 | : m_LayerOutput(nullptr) |
| 396 | { |
| 397 | } |
| 398 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 399 | const ConstTensorHandle* m_LayerOutput; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 400 | |
| 401 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 402 | }; |
| 403 | |
| 404 | struct ReshapeQueueDescriptor : QueueDescriptorWithParameters<ReshapeDescriptor> |
| 405 | { |
| 406 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 407 | }; |
| 408 | |
Nattapat Chaimanowong | 207ef9a | 2018-11-02 10:57:25 +0000 | [diff] [blame] | 409 | struct SpaceToBatchNdQueueDescriptor : QueueDescriptorWithParameters<SpaceToBatchNdDescriptor> |
| 410 | { |
| 411 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 412 | }; |
| 413 | |
Aron Virginas-Tar | 972af15 | 2019-06-11 14:14:03 +0100 | [diff] [blame] | 414 | struct SpaceToDepthQueueDescriptor : QueueDescriptorWithParameters<SpaceToDepthDescriptor> |
| 415 | { |
| 416 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 417 | }; |
| 418 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 419 | struct FloorQueueDescriptor : QueueDescriptor |
| 420 | { |
| 421 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 422 | }; |
| 423 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 424 | struct LstmQueueDescriptor : QueueDescriptorWithParameters<LstmDescriptor> |
| 425 | { |
| 426 | LstmQueueDescriptor() |
| 427 | : m_InputToInputWeights(nullptr) |
| 428 | , m_InputToForgetWeights(nullptr) |
| 429 | , m_InputToCellWeights(nullptr) |
| 430 | , m_InputToOutputWeights(nullptr) |
| 431 | , m_RecurrentToInputWeights(nullptr) |
| 432 | , m_RecurrentToForgetWeights(nullptr) |
| 433 | , m_RecurrentToCellWeights(nullptr) |
| 434 | , m_RecurrentToOutputWeights(nullptr) |
| 435 | , m_CellToInputWeights(nullptr) |
| 436 | , m_CellToForgetWeights(nullptr) |
| 437 | , m_CellToOutputWeights(nullptr) |
| 438 | , m_InputGateBias(nullptr) |
| 439 | , m_ForgetGateBias(nullptr) |
| 440 | , m_CellBias(nullptr) |
| 441 | , m_OutputGateBias(nullptr) |
| 442 | , m_ProjectionWeights(nullptr) |
| 443 | , m_ProjectionBias(nullptr) |
Jan Eilers | 38e05bd | 2019-06-26 13:10:09 +0100 | [diff] [blame] | 444 | , m_InputLayerNormWeights(nullptr) |
| 445 | , m_ForgetLayerNormWeights(nullptr) |
| 446 | , m_CellLayerNormWeights(nullptr) |
| 447 | , m_OutputLayerNormWeights(nullptr) |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 448 | { |
| 449 | } |
| 450 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 451 | const ConstTensorHandle* m_InputToInputWeights; |
| 452 | const ConstTensorHandle* m_InputToForgetWeights; |
| 453 | const ConstTensorHandle* m_InputToCellWeights; |
| 454 | const ConstTensorHandle* m_InputToOutputWeights; |
| 455 | const ConstTensorHandle* m_RecurrentToInputWeights; |
| 456 | const ConstTensorHandle* m_RecurrentToForgetWeights; |
| 457 | const ConstTensorHandle* m_RecurrentToCellWeights; |
| 458 | const ConstTensorHandle* m_RecurrentToOutputWeights; |
| 459 | const ConstTensorHandle* m_CellToInputWeights; |
| 460 | const ConstTensorHandle* m_CellToForgetWeights; |
| 461 | const ConstTensorHandle* m_CellToOutputWeights; |
| 462 | const ConstTensorHandle* m_InputGateBias; |
| 463 | const ConstTensorHandle* m_ForgetGateBias; |
| 464 | const ConstTensorHandle* m_CellBias; |
| 465 | const ConstTensorHandle* m_OutputGateBias; |
| 466 | const ConstTensorHandle* m_ProjectionWeights; |
| 467 | const ConstTensorHandle* m_ProjectionBias; |
| 468 | const ConstTensorHandle* m_InputLayerNormWeights; |
| 469 | const ConstTensorHandle* m_ForgetLayerNormWeights; |
| 470 | const ConstTensorHandle* m_CellLayerNormWeights; |
| 471 | const ConstTensorHandle* m_OutputLayerNormWeights; |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 472 | |
| 473 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 474 | }; |
| 475 | |
Narumol Prangnawarat | 7ddbbae | 2020-03-13 10:26:05 +0000 | [diff] [blame] | 476 | struct ConvertBf16ToFp32QueueDescriptor : QueueDescriptor |
| 477 | { |
| 478 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 479 | }; |
| 480 | |
Narumol Prangnawarat | ea54a01 | 2020-03-16 16:36:10 +0000 | [diff] [blame] | 481 | struct ConvertFp32ToBf16QueueDescriptor : QueueDescriptor |
| 482 | { |
| 483 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 484 | }; |
| 485 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 486 | struct ConvertFp16ToFp32QueueDescriptor : QueueDescriptor |
| 487 | { |
| 488 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 489 | }; |
| 490 | |
| 491 | struct ConvertFp32ToFp16QueueDescriptor : QueueDescriptor |
| 492 | { |
| 493 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 494 | }; |
| 495 | |
Éanna Ó Catháin | 4e1e136 | 2018-11-12 11:36:34 +0000 | [diff] [blame] | 496 | struct BatchToSpaceNdQueueDescriptor : QueueDescriptorWithParameters<BatchToSpaceNdDescriptor> |
| 497 | { |
| 498 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 499 | }; |
Conor Kennedy | 430b5d8 | 2018-11-14 15:28:28 +0000 | [diff] [blame] | 500 | |
| 501 | struct StridedSliceQueueDescriptor : QueueDescriptorWithParameters<StridedSliceDescriptor> |
| 502 | { |
| 503 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 504 | }; |
| 505 | |
Éanna Ó Catháin | 20e5880 | 2018-12-04 10:29:06 +0000 | [diff] [blame] | 506 | // Minimum layer workload data. |
kevmay01 | 9053969 | 2018-11-29 08:40:19 +0000 | [diff] [blame] | 507 | struct MinimumQueueDescriptor : QueueDescriptor |
| 508 | { |
| 509 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 510 | }; |
| 511 | |
Teresa Charlin | 2b030d9 | 2020-03-27 16:40:56 +0000 | [diff] [blame] | 512 | // Deprecated use ComparisonQueueDescriptor instead |
Matteo Martincigh | 59a950c | 2018-12-13 12:48:25 +0000 | [diff] [blame] | 513 | struct GreaterQueueDescriptor : QueueDescriptor |
| 514 | { |
| 515 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 516 | }; |
| 517 | |
Nattapat Chaimanowong | 964e955 | 2019-03-26 11:03:26 +0000 | [diff] [blame] | 518 | struct DebugQueueDescriptor : QueueDescriptor |
Nattapat Chaimanowong | a9a1cf1 | 2018-12-03 16:06:49 +0000 | [diff] [blame] | 519 | { |
janeil01 | 3fec1ea | 2019-11-07 09:47:20 +0000 | [diff] [blame] | 520 | DebugQueueDescriptor() : m_Guid(0) {} |
| 521 | |
Nattapat Chaimanowong | a9a1cf1 | 2018-12-03 16:06:49 +0000 | [diff] [blame] | 522 | void Validate(const WorkloadInfo& workloadInfo) const; |
Nattapat Chaimanowong | 964e955 | 2019-03-26 11:03:26 +0000 | [diff] [blame] | 523 | |
| 524 | LayerGuid m_Guid; |
| 525 | std::string m_LayerName; |
| 526 | unsigned int m_SlotIndex; |
Nattapat Chaimanowong | a9a1cf1 | 2018-12-03 16:06:49 +0000 | [diff] [blame] | 527 | }; |
| 528 | |
Mohamed Nour Abouelseoud | a1d3c6a | 2018-12-27 12:39:16 +0000 | [diff] [blame] | 529 | struct RsqrtQueueDescriptor : QueueDescriptor |
| 530 | { |
| 531 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 532 | }; |
| 533 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 534 | struct GatherQueueDescriptor : QueueDescriptorWithParameters<GatherDescriptor> |
narpra01 | b89b05f | 2019-01-16 09:53:09 +0000 | [diff] [blame] | 535 | { |
| 536 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 537 | }; |
| 538 | |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 539 | struct PreCompiledQueueDescriptor : QueueDescriptorWithParameters<PreCompiledDescriptor> |
| 540 | { |
| 541 | PreCompiledQueueDescriptor() |
| 542 | : m_PreCompiledObject(nullptr) |
| 543 | { |
| 544 | } |
| 545 | |
Matteo Martincigh | 7997a35 | 2019-04-17 15:37:30 +0100 | [diff] [blame] | 546 | void* m_PreCompiledObject; |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 547 | |
| 548 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 549 | }; |
| 550 | |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 551 | struct DequantizeQueueDescriptor : QueueDescriptor |
| 552 | { |
| 553 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 554 | }; |
| 555 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 556 | struct MergeQueueDescriptor : QueueDescriptor |
| 557 | { |
| 558 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 559 | }; |
| 560 | |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 561 | struct SwitchQueueDescriptor : QueueDescriptor |
| 562 | { |
| 563 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 564 | }; |
| 565 | |
Matteo Martincigh | 0e406ee | 2019-06-12 15:42:18 +0100 | [diff] [blame] | 566 | struct PreluQueueDescriptor : QueueDescriptor |
| 567 | { |
| 568 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 569 | }; |
| 570 | |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 571 | struct TransposeConvolution2dQueueDescriptor : QueueDescriptorWithParameters<TransposeConvolution2dDescriptor> |
| 572 | { |
| 573 | TransposeConvolution2dQueueDescriptor() : |
| 574 | m_Weight(nullptr), |
| 575 | m_Bias(nullptr) |
| 576 | {} |
| 577 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 578 | const ConstTensorHandle* m_Weight; |
| 579 | const ConstTensorHandle* m_Bias; |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 580 | |
| 581 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 582 | }; |
| 583 | |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 584 | struct TransposeQueueDescriptor : QueueDescriptorWithParameters<TransposeDescriptor> |
| 585 | { |
| 586 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 587 | }; |
| 588 | |
James Conroy | 586a9aa | 2020-03-20 08:49:33 +0000 | [diff] [blame] | 589 | struct QLstmQueueDescriptor : QueueDescriptorWithParameters<QLstmDescriptor> |
| 590 | { |
| 591 | QLstmQueueDescriptor() |
| 592 | : m_InputToInputWeights(nullptr) |
| 593 | , m_InputToForgetWeights(nullptr) |
| 594 | , m_InputToCellWeights(nullptr) |
| 595 | , m_InputToOutputWeights(nullptr) |
| 596 | , m_RecurrentToInputWeights(nullptr) |
| 597 | , m_RecurrentToForgetWeights(nullptr) |
| 598 | , m_RecurrentToCellWeights(nullptr) |
| 599 | , m_RecurrentToOutputWeights(nullptr) |
| 600 | , m_CellToInputWeights(nullptr) |
| 601 | , m_CellToForgetWeights(nullptr) |
| 602 | , m_CellToOutputWeights(nullptr) |
| 603 | , m_InputGateBias(nullptr) |
| 604 | , m_ForgetGateBias(nullptr) |
| 605 | , m_CellBias(nullptr) |
| 606 | , m_OutputGateBias(nullptr) |
| 607 | , m_ProjectionWeights(nullptr) |
| 608 | , m_ProjectionBias(nullptr) |
| 609 | , m_InputLayerNormWeights(nullptr) |
| 610 | , m_ForgetLayerNormWeights(nullptr) |
| 611 | , m_CellLayerNormWeights(nullptr) |
| 612 | , m_OutputLayerNormWeights(nullptr) |
| 613 | { |
| 614 | } |
| 615 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 616 | const ConstTensorHandle* m_InputToInputWeights; |
| 617 | const ConstTensorHandle* m_InputToForgetWeights; |
| 618 | const ConstTensorHandle* m_InputToCellWeights; |
| 619 | const ConstTensorHandle* m_InputToOutputWeights; |
| 620 | const ConstTensorHandle* m_RecurrentToInputWeights; |
| 621 | const ConstTensorHandle* m_RecurrentToForgetWeights; |
| 622 | const ConstTensorHandle* m_RecurrentToCellWeights; |
| 623 | const ConstTensorHandle* m_RecurrentToOutputWeights; |
| 624 | const ConstTensorHandle* m_CellToInputWeights; |
| 625 | const ConstTensorHandle* m_CellToForgetWeights; |
| 626 | const ConstTensorHandle* m_CellToOutputWeights; |
| 627 | const ConstTensorHandle* m_InputGateBias; |
| 628 | const ConstTensorHandle* m_ForgetGateBias; |
| 629 | const ConstTensorHandle* m_CellBias; |
| 630 | const ConstTensorHandle* m_OutputGateBias; |
| 631 | const ConstTensorHandle* m_ProjectionWeights; |
| 632 | const ConstTensorHandle* m_ProjectionBias; |
| 633 | const ConstTensorHandle* m_InputLayerNormWeights; |
| 634 | const ConstTensorHandle* m_ForgetLayerNormWeights; |
| 635 | const ConstTensorHandle* m_CellLayerNormWeights; |
| 636 | const ConstTensorHandle* m_OutputLayerNormWeights; |
James Conroy | 586a9aa | 2020-03-20 08:49:33 +0000 | [diff] [blame] | 637 | |
| 638 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 639 | }; |
| 640 | |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 641 | struct QuantizedLstmQueueDescriptor : QueueDescriptor |
| 642 | { |
| 643 | QuantizedLstmQueueDescriptor() |
| 644 | : m_InputToInputWeights(nullptr) |
| 645 | , m_InputToForgetWeights(nullptr) |
| 646 | , m_InputToCellWeights(nullptr) |
| 647 | , m_InputToOutputWeights(nullptr) |
| 648 | |
| 649 | , m_RecurrentToInputWeights(nullptr) |
| 650 | , m_RecurrentToForgetWeights(nullptr) |
| 651 | , m_RecurrentToCellWeights(nullptr) |
| 652 | , m_RecurrentToOutputWeights(nullptr) |
| 653 | |
| 654 | , m_InputGateBias(nullptr) |
| 655 | , m_ForgetGateBias(nullptr) |
| 656 | , m_CellBias(nullptr) |
| 657 | , m_OutputGateBias(nullptr) |
| 658 | {} |
| 659 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 660 | const ConstTensorHandle* m_InputToInputWeights; |
| 661 | const ConstTensorHandle* m_InputToForgetWeights; |
| 662 | const ConstTensorHandle* m_InputToCellWeights; |
| 663 | const ConstTensorHandle* m_InputToOutputWeights; |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 664 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 665 | const ConstTensorHandle* m_RecurrentToInputWeights; |
| 666 | const ConstTensorHandle* m_RecurrentToForgetWeights; |
| 667 | const ConstTensorHandle* m_RecurrentToCellWeights; |
| 668 | const ConstTensorHandle* m_RecurrentToOutputWeights; |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 669 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 670 | const ConstTensorHandle* m_InputGateBias; |
| 671 | const ConstTensorHandle* m_ForgetGateBias; |
| 672 | const ConstTensorHandle* m_CellBias; |
| 673 | const ConstTensorHandle* m_OutputGateBias; |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 674 | |
| 675 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 676 | }; |
| 677 | |
Kevin May | 868eb14 | 2019-09-04 17:29:31 +0100 | [diff] [blame] | 678 | struct AbsQueueDescriptor : QueueDescriptor |
| 679 | { |
| 680 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 681 | }; |
| 682 | |
Aron Virginas-Tar | 636ab40 | 2019-09-16 14:27:45 +0100 | [diff] [blame] | 683 | struct SliceQueueDescriptor : QueueDescriptorWithParameters<SliceDescriptor> |
| 684 | { |
| 685 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 686 | }; |
| 687 | |
Aron Virginas-Tar | dd6247f | 2019-09-19 14:31:17 +0100 | [diff] [blame] | 688 | struct DepthToSpaceQueueDescriptor : QueueDescriptorWithParameters<DepthToSpaceDescriptor> |
| 689 | { |
| 690 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 691 | }; |
| 692 | |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 693 | struct ComparisonQueueDescriptor : QueueDescriptorWithParameters<ComparisonDescriptor> |
| 694 | { |
| 695 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 696 | }; |
| 697 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 698 | struct ElementwiseUnaryQueueDescriptor : QueueDescriptorWithParameters<ElementwiseUnaryDescriptor> |
| 699 | { |
| 700 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 701 | }; |
| 702 | |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 703 | struct LogicalBinaryQueueDescriptor : QueueDescriptorWithParameters<LogicalBinaryDescriptor> |
| 704 | { |
| 705 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 706 | }; |
| 707 | |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 708 | struct ReduceQueueDescriptor : QueueDescriptorWithParameters<ReduceDescriptor> |
| 709 | { |
| 710 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 711 | }; |
| 712 | |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 713 | struct ShapeQueueDescriptor : QueueDescriptor |
| 714 | { |
| 715 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 716 | }; |
| 717 | |
Narumol Prangnawarat | 8ed39ae | 2021-07-15 16:16:25 +0100 | [diff] [blame] | 718 | struct UnidirectionalSequenceLstmQueueDescriptor : QueueDescriptorWithParameters<LstmDescriptor> |
| 719 | { |
| 720 | UnidirectionalSequenceLstmQueueDescriptor() |
| 721 | : m_InputToInputWeights(nullptr) |
| 722 | , m_InputToForgetWeights(nullptr) |
| 723 | , m_InputToCellWeights(nullptr) |
| 724 | , m_InputToOutputWeights(nullptr) |
| 725 | , m_RecurrentToInputWeights(nullptr) |
| 726 | , m_RecurrentToForgetWeights(nullptr) |
| 727 | , m_RecurrentToCellWeights(nullptr) |
| 728 | , m_RecurrentToOutputWeights(nullptr) |
| 729 | , m_CellToInputWeights(nullptr) |
| 730 | , m_CellToForgetWeights(nullptr) |
| 731 | , m_CellToOutputWeights(nullptr) |
| 732 | , m_InputGateBias(nullptr) |
| 733 | , m_ForgetGateBias(nullptr) |
| 734 | , m_CellBias(nullptr) |
| 735 | , m_OutputGateBias(nullptr) |
| 736 | , m_ProjectionWeights(nullptr) |
| 737 | , m_ProjectionBias(nullptr) |
| 738 | , m_InputLayerNormWeights(nullptr) |
| 739 | , m_ForgetLayerNormWeights(nullptr) |
| 740 | , m_CellLayerNormWeights(nullptr) |
| 741 | , m_OutputLayerNormWeights(nullptr) |
| 742 | { |
| 743 | } |
| 744 | |
| 745 | const ConstTensorHandle* m_InputToInputWeights; |
| 746 | const ConstTensorHandle* m_InputToForgetWeights; |
| 747 | const ConstTensorHandle* m_InputToCellWeights; |
| 748 | const ConstTensorHandle* m_InputToOutputWeights; |
| 749 | const ConstTensorHandle* m_RecurrentToInputWeights; |
| 750 | const ConstTensorHandle* m_RecurrentToForgetWeights; |
| 751 | const ConstTensorHandle* m_RecurrentToCellWeights; |
| 752 | const ConstTensorHandle* m_RecurrentToOutputWeights; |
| 753 | const ConstTensorHandle* m_CellToInputWeights; |
| 754 | const ConstTensorHandle* m_CellToForgetWeights; |
| 755 | const ConstTensorHandle* m_CellToOutputWeights; |
| 756 | const ConstTensorHandle* m_InputGateBias; |
| 757 | const ConstTensorHandle* m_ForgetGateBias; |
| 758 | const ConstTensorHandle* m_CellBias; |
| 759 | const ConstTensorHandle* m_OutputGateBias; |
| 760 | const ConstTensorHandle* m_ProjectionWeights; |
| 761 | const ConstTensorHandle* m_ProjectionBias; |
| 762 | const ConstTensorHandle* m_InputLayerNormWeights; |
| 763 | const ConstTensorHandle* m_ForgetLayerNormWeights; |
| 764 | const ConstTensorHandle* m_CellLayerNormWeights; |
| 765 | const ConstTensorHandle* m_OutputLayerNormWeights; |
| 766 | |
| 767 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 768 | }; |
| 769 | |
Simon Obute | 51f6777 | 2021-09-03 15:50:13 +0100 | [diff] [blame] | 770 | struct ChannelShuffleQueueDescriptor : QueueDescriptorWithParameters<ChannelShuffleDescriptor> |
| 771 | { |
| 772 | void Validate(const WorkloadInfo& workloadInfo) const; |
| 773 | }; |
| 774 | |
Aron Virginas-Tar | 636ab40 | 2019-09-16 14:27:45 +0100 | [diff] [blame] | 775 | } // namespace armnn |