Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 1 | // |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 6 | #include <armnn/Deprecated.hpp> |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 7 | #include <armnn/Exceptions.hpp> |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 8 | #include <armnn/Types.hpp> |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 9 | |
Matteo Martincigh | e5b8eb9 | 2019-11-28 15:45:42 +0000 | [diff] [blame] | 10 | #include <backendsCommon/LayerSupportBase.hpp> |
| 11 | |
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 12 | #include <armnn/utility/IgnoreUnused.hpp> |
Cathal Corbett | 34b429c | 2021-12-24 12:24:40 +0000 | [diff] [blame] | 13 | #include <armnn/utility/PolymorphicDowncast.hpp> |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 14 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 15 | namespace |
| 16 | { |
| 17 | |
| 18 | bool DefaultLayerSupport(const char* func, |
| 19 | const char* file, |
| 20 | unsigned int line, |
| 21 | armnn::Optional<std::string&> reasonIfUnsupported) |
| 22 | { |
| 23 | // NOTE: We only need to return the reason if the optional parameter is not empty |
| 24 | if (reasonIfUnsupported) |
| 25 | { |
| 26 | std::stringstream message; |
| 27 | message << func << " is not implemented [" << file << ":" << line << "]"; |
| 28 | |
| 29 | reasonIfUnsupported.value() = message.str(); |
| 30 | } |
| 31 | |
| 32 | return false; |
| 33 | } |
| 34 | |
| 35 | } // anonymous namespace |
| 36 | |
| 37 | namespace armnn |
| 38 | { |
| 39 | |
Cathal Corbett | 34b429c | 2021-12-24 12:24:40 +0000 | [diff] [blame] | 40 | bool LayerSupportBase::IsLayerSupported(const LayerType& type, |
| 41 | const std::vector<TensorInfo>& infos, |
| 42 | const BaseDescriptor& descriptor, |
| 43 | const Optional<LstmInputParamsInfo>&, |
| 44 | const Optional<QuantizedLstmInputParamsInfo>&, |
| 45 | Optional<std::string&> reasonIfUnsupported) const |
| 46 | { |
| 47 | switch(type) |
| 48 | { |
| 49 | case LayerType::MemCopy: |
| 50 | return IsMemCopySupported(infos[0], infos[1], reasonIfUnsupported); |
| 51 | case LayerType::MemImport: |
| 52 | return IsMemImportSupported(infos[0], infos[1], reasonIfUnsupported); |
| 53 | case LayerType::StandIn: |
| 54 | { |
| 55 | auto desc = *(PolymorphicDowncast<const StandInDescriptor*>(&descriptor)); |
| 56 | |
| 57 | if (infos.size() != (desc.m_NumInputs + desc.m_NumOutputs)) |
| 58 | { |
| 59 | throw InvalidArgumentException("Number of StandIn layer TensorInfos does not equal " |
| 60 | "the combined number of input and output slots assigned " |
| 61 | "to the StandIn descriptor"); |
| 62 | } |
| 63 | |
| 64 | std::vector<const TensorInfo*> inputInfos; |
| 65 | for (uint32_t i = 0; i < desc.m_NumInputs; i++) |
| 66 | { |
| 67 | inputInfos.push_back(&infos[i]); |
| 68 | } |
| 69 | std::vector<const TensorInfo*> outputInfos; |
| 70 | for (uint32_t i = desc.m_NumInputs; i < infos.size(); i++) |
| 71 | { |
| 72 | outputInfos.push_back(&infos[i]); |
| 73 | } |
| 74 | |
| 75 | return IsStandInSupported(inputInfos, |
| 76 | outputInfos, |
| 77 | desc, |
| 78 | reasonIfUnsupported); |
| 79 | } |
| 80 | default: |
| 81 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 82 | } |
| 83 | } |
| 84 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 85 | bool LayerSupportBase::IsActivationSupported(const TensorInfo&, // input |
| 86 | const TensorInfo&, //output |
| 87 | const ActivationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 88 | Optional<std::string&> reasonIfUnsupported) const |
| 89 | { |
| 90 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 91 | } |
| 92 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 93 | bool LayerSupportBase::IsAdditionSupported(const TensorInfo&, // input0 |
| 94 | const TensorInfo&, // input1 |
| 95 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 96 | Optional<std::string&> reasonIfUnsupported) const |
| 97 | { |
| 98 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 99 | } |
| 100 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 101 | bool LayerSupportBase::IsArgMinMaxSupported(const armnn::TensorInfo&, // input |
| 102 | const armnn::TensorInfo&, // output |
| 103 | const armnn::ArgMinMaxDescriptor&, // descriptor |
Nikhil Raj | ee391d5 | 2019-09-05 17:50:44 +0100 | [diff] [blame] | 104 | armnn::Optional<std::string &> reasonIfUnsupported) const |
| 105 | { |
| 106 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 107 | } |
| 108 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 109 | bool LayerSupportBase::IsBatchNormalizationSupported(const TensorInfo&, //input |
| 110 | const TensorInfo&, // output |
| 111 | const TensorInfo&, //mean |
| 112 | const TensorInfo&, //var |
| 113 | const TensorInfo&, //beta |
| 114 | const TensorInfo&, //gamma |
| 115 | const BatchNormalizationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 116 | Optional<std::string&> reasonIfUnsupported) const |
| 117 | { |
| 118 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 119 | } |
| 120 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 121 | bool LayerSupportBase::IsBatchToSpaceNdSupported(const TensorInfo&, // input |
| 122 | const TensorInfo&, // output |
| 123 | const BatchToSpaceNdDescriptor&, //descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 124 | Optional<std::string&> reasonIfUnsupported) const |
| 125 | { |
| 126 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 127 | } |
| 128 | |
mathad01 | b392e98 | 2021-04-07 12:07:30 +0100 | [diff] [blame] | 129 | bool LayerSupportBase::IsCastSupported(const TensorInfo&, //input |
| 130 | const TensorInfo&, //output |
| 131 | Optional<std::string &> reasonIfUnsupported) const |
| 132 | { |
| 133 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 134 | } |
| 135 | |
Simon Obute | 51f6777 | 2021-09-03 15:50:13 +0100 | [diff] [blame] | 136 | bool LayerSupportBase::IsChannelShuffleSupported(const TensorInfo&, //input |
| 137 | const TensorInfo&, //output |
| 138 | const ChannelShuffleDescriptor&, //descriptor |
| 139 | Optional<std::string &> reasonIfUnsupported) const |
| 140 | { |
| 141 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 142 | } |
| 143 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 144 | bool LayerSupportBase::IsComparisonSupported(const TensorInfo&, // input0 |
| 145 | const TensorInfo&, // input1 |
| 146 | const TensorInfo&, // output |
| 147 | const ComparisonDescriptor&, // descriptor |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 148 | Optional<std::string&> reasonIfUnsupported) const |
| 149 | { |
| 150 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 151 | } |
| 152 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 153 | bool LayerSupportBase::IsConcatSupported(const std::vector<const TensorInfo*>, // inputs |
| 154 | const TensorInfo&, // output |
| 155 | const OriginsDescriptor&, // descriptor |
Jim Flynn | 906f946 | 2019-05-10 13:55:21 +0100 | [diff] [blame] | 156 | Optional<std::string&> reasonIfUnsupported) const |
| 157 | { |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 158 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
Jim Flynn | 906f946 | 2019-05-10 13:55:21 +0100 | [diff] [blame] | 159 | } |
| 160 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 161 | bool LayerSupportBase::IsConstantSupported(const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 162 | Optional<std::string&> reasonIfUnsupported) const |
| 163 | { |
| 164 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 165 | } |
| 166 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 167 | bool LayerSupportBase::IsConvertFp16ToFp32Supported(const TensorInfo&, // input |
| 168 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 169 | Optional<std::string&> reasonIfUnsupported) const |
| 170 | { |
| 171 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 172 | } |
| 173 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 174 | bool LayerSupportBase::IsConvertFp32ToFp16Supported(const TensorInfo&, // input |
| 175 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 176 | Optional<std::string&> reasonIfUnsupported) const |
| 177 | { |
| 178 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 179 | } |
| 180 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 181 | bool LayerSupportBase::IsConvolution2dSupported(const TensorInfo&, // input |
| 182 | const TensorInfo&, // output |
| 183 | const Convolution2dDescriptor&, // descriptor |
| 184 | const TensorInfo&, // weights |
| 185 | const Optional<TensorInfo>&, // biases |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 186 | Optional<std::string&> reasonIfUnsupported) const |
| 187 | { |
| 188 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 189 | } |
| 190 | |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 191 | bool LayerSupportBase::IsConvolution3dSupported(const TensorInfo&, // input |
| 192 | const TensorInfo&, // output |
| 193 | const Convolution3dDescriptor&, // descriptor |
| 194 | const TensorInfo&, // weights |
| 195 | const Optional<TensorInfo>&, // biases |
| 196 | Optional<std::string&> reasonIfUnsupported) const |
| 197 | { |
| 198 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 199 | } |
| 200 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 201 | bool LayerSupportBase::IsDebugSupported(const TensorInfo&, // input |
| 202 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 203 | Optional<std::string&> reasonIfUnsupported) const |
| 204 | { |
| 205 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 206 | } |
| 207 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 208 | bool LayerSupportBase::IsDepthToSpaceSupported(const TensorInfo&, // input |
| 209 | const TensorInfo&, // output |
| 210 | const DepthToSpaceDescriptor&, // descriptor |
Aron Virginas-Tar | dd6247f | 2019-09-19 14:31:17 +0100 | [diff] [blame] | 211 | Optional<std::string&> reasonIfUnsupported) const |
| 212 | { |
| 213 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 214 | } |
| 215 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 216 | bool LayerSupportBase::IsDepthwiseConvolutionSupported(const TensorInfo&, //input |
| 217 | const TensorInfo&, //output |
| 218 | const DepthwiseConvolution2dDescriptor&, // descriptor |
| 219 | const TensorInfo&, // weights |
| 220 | const Optional<TensorInfo>&, // biases |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 221 | Optional<std::string&> reasonIfUnsupported) const |
| 222 | { |
| 223 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 224 | } |
| 225 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 226 | bool LayerSupportBase::IsDequantizeSupported(const TensorInfo&, // input |
| 227 | const TensorInfo&, // output |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 228 | Optional<std::string&> reasonIfUnsupported) const |
| 229 | { |
| 230 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 231 | } |
| 232 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 233 | bool LayerSupportBase::IsDetectionPostProcessSupported(const TensorInfo&, // boxEncodings |
| 234 | const TensorInfo&, // scores |
| 235 | const TensorInfo&, // anchors |
| 236 | const TensorInfo&, // detectionBoxes |
| 237 | const TensorInfo&, // detectionClasses |
| 238 | const TensorInfo&, // detectionScores |
| 239 | const TensorInfo&, // numDetections |
| 240 | const DetectionPostProcessDescriptor&, //descriptor |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 241 | Optional<std::string&> reasonIfUnsupported) const |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 242 | { |
| 243 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 244 | } |
| 245 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 246 | bool LayerSupportBase::IsDilatedDepthwiseConvolutionSupported(const TensorInfo&, // input |
| 247 | const TensorInfo&, // output |
| 248 | const DepthwiseConvolution2dDescriptor&, // descriptor |
| 249 | const TensorInfo&,// weights |
| 250 | const Optional<TensorInfo>&, // biases |
Matteo Martincigh | eac246d | 2019-05-14 09:11:03 +0100 | [diff] [blame] | 251 | Optional<std::string&> reasonIfUnsupported) const |
| 252 | { |
| 253 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 254 | } |
| 255 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 256 | bool LayerSupportBase::IsDivisionSupported(const TensorInfo&, // input0 |
| 257 | const TensorInfo&, // input1 |
| 258 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 259 | Optional<std::string&> reasonIfUnsupported) const |
| 260 | { |
| 261 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 262 | } |
| 263 | |
Jan Eilers | 1b2654f | 2021-09-24 15:45:46 +0100 | [diff] [blame] | 264 | bool LayerSupportBase::IsElementwiseUnarySupported(const TensorInfo&, // input |
| 265 | const TensorInfo&, // output |
| 266 | const ElementwiseUnaryDescriptor&, // descriptor |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 267 | Optional<std::string&> reasonIfUnsupported) const |
| 268 | { |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 269 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 270 | } |
| 271 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 272 | bool LayerSupportBase::IsFakeQuantizationSupported(const TensorInfo&, // input |
| 273 | const FakeQuantizationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 274 | Optional<std::string&> reasonIfUnsupported) const |
| 275 | { |
| 276 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 277 | } |
| 278 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 279 | bool LayerSupportBase::IsFillSupported(const TensorInfo&, // input |
| 280 | const TensorInfo&, // output |
| 281 | const FillDescriptor&, // descriptor |
Ryan OShea | ec6c680 | 2020-06-05 17:17:06 +0100 | [diff] [blame] | 282 | Optional<std::string&> reasonIfUnsupported) const |
| 283 | { |
| 284 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 285 | } |
| 286 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 287 | bool LayerSupportBase::IsFloorSupported(const TensorInfo&, // input |
| 288 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 289 | Optional<std::string&> reasonIfUnsupported) const |
| 290 | { |
| 291 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 292 | } |
| 293 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 294 | bool LayerSupportBase::IsFullyConnectedSupported(const TensorInfo&, // input |
| 295 | const TensorInfo&, // output |
| 296 | const TensorInfo&, // weights |
| 297 | const TensorInfo&, // biases |
| 298 | const FullyConnectedDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 299 | Optional<std::string&> reasonIfUnsupported) const |
| 300 | { |
| 301 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 302 | } |
| 303 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 304 | bool LayerSupportBase::IsGatherSupported(const armnn::TensorInfo&, // input0 |
| 305 | const armnn::TensorInfo&, // input1 |
| 306 | const armnn::TensorInfo&, // output |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 307 | const GatherDescriptor&, // descriptor |
| 308 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 309 | { |
| 310 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 311 | } |
| 312 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 313 | bool LayerSupportBase::IsInputSupported(const TensorInfo&, // input |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 314 | Optional<std::string&> reasonIfUnsupported) const |
| 315 | { |
| 316 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 317 | } |
| 318 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 319 | bool LayerSupportBase::IsInstanceNormalizationSupported(const TensorInfo&, // input |
| 320 | const TensorInfo&, // output |
| 321 | const InstanceNormalizationDescriptor&, // descriptor |
Kevin May | ce5045a | 2019-10-02 14:07:47 +0100 | [diff] [blame] | 322 | Optional<std::string&> reasonIfUnsupported) const |
| 323 | { |
| 324 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 325 | } |
| 326 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 327 | bool LayerSupportBase::IsL2NormalizationSupported(const TensorInfo&, // input |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 328 | const TensorInfo&, // output |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 329 | const L2NormalizationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 330 | Optional<std::string&> reasonIfUnsupported) const |
| 331 | { |
| 332 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 333 | } |
| 334 | |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 335 | bool LayerSupportBase::IsLogicalBinarySupported(const TensorInfo&, // input0 |
| 336 | const TensorInfo&, // input1 |
| 337 | const TensorInfo&, // output |
| 338 | const LogicalBinaryDescriptor&, // descriptor |
| 339 | Optional<std::string&> reasonIfUnsupported) const |
| 340 | { |
| 341 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 342 | } |
| 343 | |
| 344 | bool LayerSupportBase::IsLogicalUnarySupported(const TensorInfo&, // input |
| 345 | const TensorInfo&, // output |
| 346 | const ElementwiseUnaryDescriptor&, // descriptor |
| 347 | Optional<std::string&> reasonIfUnsupported) const |
| 348 | { |
| 349 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 350 | } |
| 351 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 352 | bool LayerSupportBase::IsLogSoftmaxSupported(const TensorInfo&, // input |
| 353 | const TensorInfo&, // output |
| 354 | const LogSoftmaxDescriptor&, // descriptor |
Aron Virginas-Tar | f982dea | 2019-10-11 14:07:53 +0100 | [diff] [blame] | 355 | Optional<std::string&> reasonIfUnsupported) const |
| 356 | { |
| 357 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 358 | } |
| 359 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 360 | bool LayerSupportBase::IsLstmSupported(const TensorInfo&, // input |
| 361 | const TensorInfo&, // outputStateIn |
| 362 | const TensorInfo&, // cellStateIn |
| 363 | const TensorInfo&, // scratchBuffer |
| 364 | const TensorInfo&, // outputStateOut |
| 365 | const TensorInfo&, // cellStateOut |
| 366 | const TensorInfo&, // output |
| 367 | const LstmDescriptor&, // descriptor |
| 368 | const LstmInputParamsInfo&, // paramsInfo |
Jan Eilers | d01a83c | 2019-07-03 18:20:40 +0100 | [diff] [blame] | 369 | Optional<std::string&> reasonIfUnsupported) const |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 370 | { |
| 371 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 372 | } |
| 373 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 374 | bool LayerSupportBase::IsMaximumSupported(const TensorInfo&, // input0 |
| 375 | const TensorInfo&, // input1 |
| 376 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 377 | Optional<std::string&> reasonIfUnsupported) const |
| 378 | { |
| 379 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 380 | } |
| 381 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 382 | bool LayerSupportBase::IsMeanSupported(const TensorInfo&, // input |
| 383 | const TensorInfo&, // output |
| 384 | const MeanDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 385 | Optional<std::string&> reasonIfUnsupported) const |
| 386 | { |
| 387 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 388 | } |
| 389 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 390 | bool LayerSupportBase::IsMemCopySupported(const armnn::TensorInfo&, // input |
| 391 | const armnn::TensorInfo&, // output |
| 392 | armnn::Optional<std::string &> ) const // reasonIfUnsupported |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 393 | { |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 394 | return true; |
| 395 | } |
| 396 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 397 | bool LayerSupportBase::IsMemImportSupported(const armnn::TensorInfo&, // input |
| 398 | const armnn::TensorInfo&, // output |
| 399 | armnn::Optional<std::string &> ) const // reasonIfUnsupported |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 400 | { |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 401 | return true; |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 402 | } |
| 403 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 404 | bool LayerSupportBase::IsMergeSupported(const TensorInfo&, // input0 |
| 405 | const TensorInfo&, // input1 |
| 406 | const TensorInfo&, // output |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 407 | Optional<std::string&> reasonIfUnsupported) const |
| 408 | { |
| 409 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 410 | } |
| 411 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 412 | bool LayerSupportBase::IsMinimumSupported(const TensorInfo&, // input0 |
| 413 | const TensorInfo&, // input1 |
| 414 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 415 | Optional<std::string&> reasonIfUnsupported) const |
| 416 | { |
| 417 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 418 | } |
| 419 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 420 | bool LayerSupportBase::IsMultiplicationSupported(const TensorInfo&, // input0 |
| 421 | const TensorInfo&, // input1 |
| 422 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 423 | Optional<std::string&> reasonIfUnsupported) const |
| 424 | { |
| 425 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 426 | } |
| 427 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 428 | bool LayerSupportBase::IsNormalizationSupported(const TensorInfo&, // input |
| 429 | const TensorInfo&, // output |
| 430 | const NormalizationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 431 | Optional<std::string&> reasonIfUnsupported) const |
| 432 | { |
| 433 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 434 | } |
| 435 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 436 | bool LayerSupportBase::IsOutputSupported(const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 437 | Optional<std::string&> reasonIfUnsupported) const |
| 438 | { |
| 439 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 440 | } |
| 441 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 442 | bool LayerSupportBase::IsPadSupported(const TensorInfo&, // input |
| 443 | const TensorInfo&, // output |
| 444 | const PadDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 445 | Optional<std::string&> reasonIfUnsupported) const |
| 446 | { |
| 447 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 448 | } |
| 449 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 450 | bool LayerSupportBase::IsPermuteSupported(const TensorInfo&, // input |
| 451 | const TensorInfo&, // output |
| 452 | const PermuteDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 453 | Optional<std::string&> reasonIfUnsupported) const |
| 454 | { |
| 455 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 456 | } |
| 457 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 458 | bool LayerSupportBase::IsPooling2dSupported(const TensorInfo&, // input |
| 459 | const TensorInfo&, // output |
| 460 | const Pooling2dDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 461 | Optional<std::string&> reasonIfUnsupported) const |
| 462 | { |
| 463 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 464 | } |
| 465 | |
Tamás Nyíri | 7b885b3 | 2021-10-26 14:47:57 +0100 | [diff] [blame] | 466 | bool LayerSupportBase::IsPooling3dSupported(const TensorInfo&, // input |
| 467 | const TensorInfo&, // output |
| 468 | const Pooling3dDescriptor&, // descriptor |
| 469 | Optional<std::string&> reasonIfUnsupported) const |
| 470 | { |
| 471 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 472 | } |
| 473 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 474 | bool LayerSupportBase::IsPreCompiledSupported(const TensorInfo&, // input |
| 475 | const PreCompiledDescriptor&, // descriptor |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 476 | Optional<std::string&> reasonIfUnsupported) const |
| 477 | { |
| 478 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 479 | } |
| 480 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 481 | bool LayerSupportBase::IsPreluSupported(const TensorInfo&, // input |
| 482 | const TensorInfo&, // alpha |
| 483 | const TensorInfo&, // output |
Matteo Martincigh | 0e406ee | 2019-06-12 15:42:18 +0100 | [diff] [blame] | 484 | Optional<std::string &> reasonIfUnsupported) const |
| 485 | { |
| 486 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 487 | } |
| 488 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 489 | bool LayerSupportBase::IsQuantizeSupported(const armnn::TensorInfo&, // input |
| 490 | const armnn::TensorInfo&, // output |
Derek Lamberti | a9cca6a | 2019-03-25 15:41:58 +0000 | [diff] [blame] | 491 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 492 | { |
| 493 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 494 | } |
| 495 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 496 | bool LayerSupportBase::IsQLstmSupported(const TensorInfo&, // input |
| 497 | const TensorInfo&, // previousOutputIn |
| 498 | const TensorInfo&, // previousCellStateIn |
| 499 | const TensorInfo&, // outputStateOut |
| 500 | const TensorInfo&, // cellStateOut |
| 501 | const TensorInfo&, // output |
| 502 | const QLstmDescriptor&, // descriptor |
| 503 | const LstmInputParamsInfo&, // paramsInfo |
James Conroy | 586a9aa | 2020-03-20 08:49:33 +0000 | [diff] [blame] | 504 | Optional<std::string&> reasonIfUnsupported) const |
| 505 | { |
| 506 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 507 | } |
| 508 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 509 | bool LayerSupportBase::IsQuantizedLstmSupported(const TensorInfo&, // input |
| 510 | const TensorInfo&, // previousCellStateIn |
| 511 | const TensorInfo&, // previousOutputIn |
| 512 | const TensorInfo&, // cellStateOut |
| 513 | const TensorInfo&, // output |
| 514 | const QuantizedLstmInputParamsInfo&, // paramsInfo |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 515 | Optional<std::string&> reasonIfUnsupported) const |
| 516 | { |
| 517 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 518 | } |
| 519 | |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 520 | bool LayerSupportBase::IsRankSupported(const TensorInfo&, // input |
| 521 | const TensorInfo&, // output |
| 522 | Optional<std::string&> reasonIfUnsupported) const |
| 523 | { |
| 524 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 525 | } |
| 526 | |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 527 | bool LayerSupportBase::IsReduceSupported(const TensorInfo& /*input*/, |
| 528 | const TensorInfo& /*output*/, |
| 529 | const ReduceDescriptor& /*descriptor*/, |
| 530 | Optional<std::string&> reasonIfUnsupported) const |
| 531 | { |
| 532 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 533 | } |
| 534 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 535 | bool LayerSupportBase::IsReshapeSupported(const TensorInfo&, // input |
| 536 | const TensorInfo&, // output |
| 537 | const ReshapeDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 538 | Optional<std::string&> reasonIfUnsupported) const |
| 539 | { |
| 540 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 541 | } |
| 542 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 543 | bool LayerSupportBase::IsResizeSupported(const TensorInfo&, // input |
| 544 | const TensorInfo&, // output |
| 545 | const ResizeDescriptor&, // descriptor |
Teresa Charlin | a9075df | 2019-06-27 15:41:57 +0100 | [diff] [blame] | 546 | Optional<std::string&> reasonIfUnsupported) const |
| 547 | { |
| 548 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 549 | } |
| 550 | |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 551 | bool LayerSupportBase::IsShapeSupported(const TensorInfo&, // input |
| 552 | const TensorInfo&, // output |
| 553 | Optional<std::string&> reasonIfUnsupported) const |
| 554 | { |
| 555 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 556 | } |
| 557 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 558 | bool LayerSupportBase::IsSliceSupported(const TensorInfo&, // input |
| 559 | const TensorInfo&, // output |
| 560 | const SliceDescriptor&, // descriptor |
Aron Virginas-Tar | 636ab40 | 2019-09-16 14:27:45 +0100 | [diff] [blame] | 561 | Optional<std::string&> reasonIfUnsupported) const |
| 562 | { |
| 563 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 564 | } |
| 565 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 566 | bool LayerSupportBase::IsSoftmaxSupported(const TensorInfo&, // input |
| 567 | const TensorInfo&, // output |
| 568 | const SoftmaxDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 569 | Optional<std::string&> reasonIfUnsupported) const |
| 570 | { |
| 571 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 572 | } |
Derek Lamberti | 901ea11 | 2019-12-10 22:07:09 +0000 | [diff] [blame] | 573 | /**/ |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 574 | bool LayerSupportBase::IsSpaceToBatchNdSupported(const TensorInfo&, // input |
| 575 | const TensorInfo&, // output |
| 576 | const SpaceToBatchNdDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 577 | Optional<std::string&> reasonIfUnsupported) const |
| 578 | { |
| 579 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 580 | } |
| 581 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 582 | bool LayerSupportBase::IsSpaceToDepthSupported(const TensorInfo&, // input |
| 583 | const TensorInfo&, // output |
| 584 | const SpaceToDepthDescriptor&, // descriptor |
Aron Virginas-Tar | 972af15 | 2019-06-11 14:14:03 +0100 | [diff] [blame] | 585 | Optional<std::string&> reasonIfUnsupported) const |
| 586 | { |
| 587 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 588 | } |
| 589 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 590 | bool LayerSupportBase::IsSplitterSupported(const TensorInfo&, // input |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 591 | const std::vector<std::reference_wrapper<TensorInfo>>&, // outputs |
| 592 | const ViewsDescriptor&, // descriptor |
Narumol Prangnawarat | 15eb583 | 2019-05-20 15:31:05 +0100 | [diff] [blame] | 593 | Optional<std::string&> reasonIfUnsupported) const |
| 594 | { |
| 595 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 596 | } |
| 597 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 598 | bool LayerSupportBase::IsStackSupported(const std::vector<const TensorInfo*>&, // inputs |
| 599 | const TensorInfo&, // output |
| 600 | const StackDescriptor&, // descriptor |
Matthew Jackson | 2b8c1da | 2019-07-04 14:59:16 +0100 | [diff] [blame] | 601 | Optional<std::string&> reasonIfUnsupported) const |
| 602 | { |
| 603 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 604 | } |
| 605 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 606 | bool LayerSupportBase::IsStandInSupported(const std::vector<const TensorInfo*>&, // inputs |
| 607 | const std::vector<const TensorInfo*>&, // outputs |
| 608 | const StandInDescriptor&, // descriptor |
Derek Lamberti | 013c390 | 2019-10-21 10:46:16 +0100 | [diff] [blame] | 609 | Optional<std::string&> reasonIfUnsupported) const |
| 610 | { |
| 611 | if (reasonIfUnsupported) |
| 612 | { |
| 613 | std::stringstream message; |
| 614 | message << "StandIn layer is not executable via backends"; |
| 615 | |
| 616 | reasonIfUnsupported.value() = message.str(); |
| 617 | } |
| 618 | |
| 619 | return false; |
| 620 | } |
| 621 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 622 | bool LayerSupportBase::IsStridedSliceSupported(const TensorInfo&, // input |
| 623 | const TensorInfo&, // output |
| 624 | const StridedSliceDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 625 | Optional<std::string&> reasonIfUnsupported) const |
| 626 | { |
| 627 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 628 | } |
| 629 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 630 | bool LayerSupportBase::IsSubtractionSupported(const TensorInfo&, // input0 |
| 631 | const TensorInfo&, // input1 |
| 632 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 633 | Optional<std::string&> reasonIfUnsupported) const |
| 634 | { |
| 635 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 636 | } |
| 637 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 638 | bool LayerSupportBase::IsSwitchSupported(const TensorInfo&, // input0 |
| 639 | const TensorInfo&, // input1 |
| 640 | const TensorInfo&, // output0 |
| 641 | const TensorInfo&, // output1 |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 642 | Optional<std::string&> reasonIfUnsupported) const |
| 643 | { |
| 644 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 645 | } |
| 646 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 647 | bool LayerSupportBase::IsTransposeConvolution2dSupported(const TensorInfo&, // input |
| 648 | const TensorInfo&, // output |
| 649 | const TransposeConvolution2dDescriptor&, // descriptor |
| 650 | const TensorInfo&, // weights |
| 651 | const Optional<TensorInfo>&, // biases |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 652 | Optional<std::string&> reasonIfUnsupported) const |
| 653 | { |
| 654 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 655 | } |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 656 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 657 | bool LayerSupportBase::IsTransposeSupported(const TensorInfo&, // input |
| 658 | const TensorInfo&, // output |
| 659 | const TransposeDescriptor&, // descriptor |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 660 | Optional<std::string&> reasonIfUnsupported) const |
| 661 | { |
| 662 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 663 | } |
| 664 | |
Narumol Prangnawarat | 8ed39ae | 2021-07-15 16:16:25 +0100 | [diff] [blame] | 665 | bool LayerSupportBase::IsUnidirectionalSequenceLstmSupported(const TensorInfo&, // input |
| 666 | const TensorInfo&, // outputStateIn |
| 667 | const TensorInfo&, // cellStateIn |
Mike Kelly | 1299496 | 2022-04-21 11:57:09 +0100 | [diff] [blame] | 668 | const TensorInfo&, // outputStateOut |
| 669 | const TensorInfo&, // cellStateOut |
Narumol Prangnawarat | 8ed39ae | 2021-07-15 16:16:25 +0100 | [diff] [blame] | 670 | const TensorInfo&, // output |
Narumol Prangnawarat | 8ed39ae | 2021-07-15 16:16:25 +0100 | [diff] [blame] | 671 | const LstmDescriptor&, // descriptor |
| 672 | const LstmInputParamsInfo&, // paramsInfo |
| 673 | Optional<std::string&> reasonIfUnsupported) const |
| 674 | { |
| 675 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 676 | } |
| 677 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 678 | } // namespace armnn |