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::IsConvertBf16ToFp32Supported(const TensorInfo&, // input |
| 168 | const TensorInfo&, // output |
Narumol Prangnawarat | 7ddbbae | 2020-03-13 10:26:05 +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::IsConvertFp16ToFp32Supported(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::IsConvertFp32ToBf16Supported(const TensorInfo&, // input |
| 182 | const TensorInfo&, // output |
Narumol Prangnawarat | ea54a01 | 2020-03-16 16:36:10 +0000 | [diff] [blame] | 183 | Optional<std::string&> reasonIfUnsupported) const |
| 184 | { |
| 185 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 186 | } |
| 187 | |
| 188 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 189 | bool LayerSupportBase::IsConvertFp32ToFp16Supported(const TensorInfo&, // input |
| 190 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 191 | Optional<std::string&> reasonIfUnsupported) const |
| 192 | { |
| 193 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 194 | } |
| 195 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 196 | bool LayerSupportBase::IsConvolution2dSupported(const TensorInfo&, // input |
| 197 | const TensorInfo&, // output |
| 198 | const Convolution2dDescriptor&, // descriptor |
| 199 | const TensorInfo&, // weights |
| 200 | const Optional<TensorInfo>&, // biases |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 201 | Optional<std::string&> reasonIfUnsupported) const |
| 202 | { |
| 203 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 204 | } |
| 205 | |
Matthew Sloyan | b63a311 | 2021-09-08 13:05:51 +0100 | [diff] [blame] | 206 | bool LayerSupportBase::IsConvolution3dSupported(const TensorInfo&, // input |
| 207 | const TensorInfo&, // output |
| 208 | const Convolution3dDescriptor&, // descriptor |
| 209 | const TensorInfo&, // weights |
| 210 | const Optional<TensorInfo>&, // biases |
| 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::IsDebugSupported(const TensorInfo&, // input |
| 217 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 218 | Optional<std::string&> reasonIfUnsupported) const |
| 219 | { |
| 220 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 221 | } |
| 222 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 223 | bool LayerSupportBase::IsDepthToSpaceSupported(const TensorInfo&, // input |
| 224 | const TensorInfo&, // output |
| 225 | const DepthToSpaceDescriptor&, // descriptor |
Aron Virginas-Tar | dd6247f | 2019-09-19 14:31:17 +0100 | [diff] [blame] | 226 | Optional<std::string&> reasonIfUnsupported) const |
| 227 | { |
| 228 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 229 | } |
| 230 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 231 | bool LayerSupportBase::IsDepthwiseConvolutionSupported(const TensorInfo&, //input |
| 232 | const TensorInfo&, //output |
| 233 | const DepthwiseConvolution2dDescriptor&, // descriptor |
| 234 | const TensorInfo&, // weights |
| 235 | const Optional<TensorInfo>&, // biases |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 236 | Optional<std::string&> reasonIfUnsupported) const |
| 237 | { |
| 238 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 239 | } |
| 240 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 241 | bool LayerSupportBase::IsDequantizeSupported(const TensorInfo&, // input |
| 242 | const TensorInfo&, // output |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 243 | Optional<std::string&> reasonIfUnsupported) const |
| 244 | { |
| 245 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 246 | } |
| 247 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 248 | bool LayerSupportBase::IsDetectionPostProcessSupported(const TensorInfo&, // boxEncodings |
| 249 | const TensorInfo&, // scores |
| 250 | const TensorInfo&, // anchors |
| 251 | const TensorInfo&, // detectionBoxes |
| 252 | const TensorInfo&, // detectionClasses |
| 253 | const TensorInfo&, // detectionScores |
| 254 | const TensorInfo&, // numDetections |
| 255 | const DetectionPostProcessDescriptor&, //descriptor |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 256 | Optional<std::string&> reasonIfUnsupported) const |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 257 | { |
| 258 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 259 | } |
| 260 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 261 | bool LayerSupportBase::IsDilatedDepthwiseConvolutionSupported(const TensorInfo&, // input |
| 262 | const TensorInfo&, // output |
| 263 | const DepthwiseConvolution2dDescriptor&, // descriptor |
| 264 | const TensorInfo&,// weights |
| 265 | const Optional<TensorInfo>&, // biases |
Matteo Martincigh | eac246d | 2019-05-14 09:11:03 +0100 | [diff] [blame] | 266 | Optional<std::string&> reasonIfUnsupported) const |
| 267 | { |
| 268 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 269 | } |
| 270 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 271 | bool LayerSupportBase::IsDivisionSupported(const TensorInfo&, // input0 |
| 272 | const TensorInfo&, // input1 |
| 273 | const TensorInfo&, // output |
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 | |
Jan Eilers | 1b2654f | 2021-09-24 15:45:46 +0100 | [diff] [blame] | 279 | bool LayerSupportBase::IsElementwiseUnarySupported(const TensorInfo&, // input |
| 280 | const TensorInfo&, // output |
| 281 | const ElementwiseUnaryDescriptor&, // descriptor |
josh minor | 4a3c610 | 2020-01-06 16:40:46 -0600 | [diff] [blame] | 282 | Optional<std::string&> reasonIfUnsupported) const |
| 283 | { |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 284 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 285 | } |
| 286 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 287 | bool LayerSupportBase::IsFakeQuantizationSupported(const TensorInfo&, // input |
| 288 | const FakeQuantizationDescriptor&, // descriptor |
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::IsFillSupported(const TensorInfo&, // input |
| 295 | const TensorInfo&, // output |
| 296 | const FillDescriptor&, // descriptor |
Ryan OShea | ec6c680 | 2020-06-05 17:17:06 +0100 | [diff] [blame] | 297 | Optional<std::string&> reasonIfUnsupported) const |
| 298 | { |
| 299 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 300 | } |
| 301 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 302 | bool LayerSupportBase::IsFloorSupported(const TensorInfo&, // input |
| 303 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 304 | Optional<std::string&> reasonIfUnsupported) const |
| 305 | { |
| 306 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 307 | } |
| 308 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 309 | bool LayerSupportBase::IsFullyConnectedSupported(const TensorInfo&, // input |
| 310 | const TensorInfo&, // output |
| 311 | const TensorInfo&, // weights |
| 312 | const TensorInfo&, // biases |
| 313 | const FullyConnectedDescriptor&, // descriptor |
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::IsGatherSupported(const armnn::TensorInfo&, // input0 |
| 320 | const armnn::TensorInfo&, // input1 |
| 321 | const armnn::TensorInfo&, // output |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 322 | const GatherDescriptor&, // descriptor |
| 323 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 324 | { |
| 325 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 326 | } |
| 327 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 328 | bool LayerSupportBase::IsInputSupported(const TensorInfo&, // input |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 329 | Optional<std::string&> reasonIfUnsupported) const |
| 330 | { |
| 331 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 332 | } |
| 333 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 334 | bool LayerSupportBase::IsInstanceNormalizationSupported(const TensorInfo&, // input |
| 335 | const TensorInfo&, // output |
| 336 | const InstanceNormalizationDescriptor&, // descriptor |
Kevin May | ce5045a | 2019-10-02 14:07:47 +0100 | [diff] [blame] | 337 | Optional<std::string&> reasonIfUnsupported) const |
| 338 | { |
| 339 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 340 | } |
| 341 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 342 | bool LayerSupportBase::IsL2NormalizationSupported(const TensorInfo&, // input |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 343 | const TensorInfo&, // output |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 344 | const L2NormalizationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 345 | Optional<std::string&> reasonIfUnsupported) const |
| 346 | { |
| 347 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 348 | } |
| 349 | |
James Conroy | aba90cd | 2020-11-06 16:28:18 +0000 | [diff] [blame] | 350 | bool LayerSupportBase::IsLogicalBinarySupported(const TensorInfo&, // input0 |
| 351 | const TensorInfo&, // input1 |
| 352 | const TensorInfo&, // output |
| 353 | const LogicalBinaryDescriptor&, // descriptor |
| 354 | Optional<std::string&> reasonIfUnsupported) const |
| 355 | { |
| 356 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 357 | } |
| 358 | |
| 359 | bool LayerSupportBase::IsLogicalUnarySupported(const TensorInfo&, // input |
| 360 | const TensorInfo&, // output |
| 361 | const ElementwiseUnaryDescriptor&, // descriptor |
| 362 | Optional<std::string&> reasonIfUnsupported) const |
| 363 | { |
| 364 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 365 | } |
| 366 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 367 | bool LayerSupportBase::IsLogSoftmaxSupported(const TensorInfo&, // input |
| 368 | const TensorInfo&, // output |
| 369 | const LogSoftmaxDescriptor&, // descriptor |
Aron Virginas-Tar | f982dea | 2019-10-11 14:07:53 +0100 | [diff] [blame] | 370 | Optional<std::string&> reasonIfUnsupported) const |
| 371 | { |
| 372 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 373 | } |
| 374 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 375 | bool LayerSupportBase::IsLstmSupported(const TensorInfo&, // input |
| 376 | const TensorInfo&, // outputStateIn |
| 377 | const TensorInfo&, // cellStateIn |
| 378 | const TensorInfo&, // scratchBuffer |
| 379 | const TensorInfo&, // outputStateOut |
| 380 | const TensorInfo&, // cellStateOut |
| 381 | const TensorInfo&, // output |
| 382 | const LstmDescriptor&, // descriptor |
| 383 | const LstmInputParamsInfo&, // paramsInfo |
Jan Eilers | d01a83c | 2019-07-03 18:20:40 +0100 | [diff] [blame] | 384 | Optional<std::string&> reasonIfUnsupported) const |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 385 | { |
| 386 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 387 | } |
| 388 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 389 | bool LayerSupportBase::IsMaximumSupported(const TensorInfo&, // input0 |
| 390 | const TensorInfo&, // input1 |
| 391 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 392 | Optional<std::string&> reasonIfUnsupported) const |
| 393 | { |
| 394 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 395 | } |
| 396 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 397 | bool LayerSupportBase::IsMeanSupported(const TensorInfo&, // input |
| 398 | const TensorInfo&, // output |
| 399 | const MeanDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 400 | Optional<std::string&> reasonIfUnsupported) const |
| 401 | { |
| 402 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 403 | } |
| 404 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 405 | bool LayerSupportBase::IsMemCopySupported(const armnn::TensorInfo&, // input |
| 406 | const armnn::TensorInfo&, // output |
| 407 | armnn::Optional<std::string &> ) const // reasonIfUnsupported |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 408 | { |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 409 | return true; |
| 410 | } |
| 411 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 412 | bool LayerSupportBase::IsMemImportSupported(const armnn::TensorInfo&, // input |
| 413 | const armnn::TensorInfo&, // output |
| 414 | armnn::Optional<std::string &> ) const // reasonIfUnsupported |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 415 | { |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 416 | return true; |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 417 | } |
| 418 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 419 | bool LayerSupportBase::IsMergeSupported(const TensorInfo&, // input0 |
| 420 | const TensorInfo&, // input1 |
| 421 | const TensorInfo&, // output |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 422 | Optional<std::string&> reasonIfUnsupported) const |
| 423 | { |
| 424 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 425 | } |
| 426 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 427 | bool LayerSupportBase::IsMinimumSupported(const TensorInfo&, // input0 |
| 428 | const TensorInfo&, // input1 |
| 429 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 430 | Optional<std::string&> reasonIfUnsupported) const |
| 431 | { |
| 432 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 433 | } |
| 434 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 435 | bool LayerSupportBase::IsMultiplicationSupported(const TensorInfo&, // input0 |
| 436 | const TensorInfo&, // input1 |
| 437 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 438 | Optional<std::string&> reasonIfUnsupported) const |
| 439 | { |
| 440 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 441 | } |
| 442 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 443 | bool LayerSupportBase::IsNormalizationSupported(const TensorInfo&, // input |
| 444 | const TensorInfo&, // output |
| 445 | const NormalizationDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 446 | Optional<std::string&> reasonIfUnsupported) const |
| 447 | { |
| 448 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 449 | } |
| 450 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 451 | bool LayerSupportBase::IsOutputSupported(const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 452 | Optional<std::string&> reasonIfUnsupported) const |
| 453 | { |
| 454 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 455 | } |
| 456 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 457 | bool LayerSupportBase::IsPadSupported(const TensorInfo&, // input |
| 458 | const TensorInfo&, // output |
| 459 | const PadDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 460 | Optional<std::string&> reasonIfUnsupported) const |
| 461 | { |
| 462 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 463 | } |
| 464 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 465 | bool LayerSupportBase::IsPermuteSupported(const TensorInfo&, // input |
| 466 | const TensorInfo&, // output |
| 467 | const PermuteDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 468 | Optional<std::string&> reasonIfUnsupported) const |
| 469 | { |
| 470 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 471 | } |
| 472 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 473 | bool LayerSupportBase::IsPooling2dSupported(const TensorInfo&, // input |
| 474 | const TensorInfo&, // output |
| 475 | const Pooling2dDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 476 | Optional<std::string&> reasonIfUnsupported) const |
| 477 | { |
| 478 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 479 | } |
| 480 | |
Tamás Nyíri | 7b885b3 | 2021-10-26 14:47:57 +0100 | [diff] [blame] | 481 | bool LayerSupportBase::IsPooling3dSupported(const TensorInfo&, // input |
| 482 | const TensorInfo&, // output |
| 483 | const Pooling3dDescriptor&, // descriptor |
| 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::IsPreCompiledSupported(const TensorInfo&, // input |
| 490 | const PreCompiledDescriptor&, // descriptor |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 491 | 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::IsPreluSupported(const TensorInfo&, // input |
| 497 | const TensorInfo&, // alpha |
| 498 | const TensorInfo&, // output |
Matteo Martincigh | 0e406ee | 2019-06-12 15:42:18 +0100 | [diff] [blame] | 499 | Optional<std::string &> reasonIfUnsupported) const |
| 500 | { |
| 501 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 502 | } |
| 503 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 504 | bool LayerSupportBase::IsQuantizeSupported(const armnn::TensorInfo&, // input |
| 505 | const armnn::TensorInfo&, // output |
Derek Lamberti | a9cca6a | 2019-03-25 15:41:58 +0000 | [diff] [blame] | 506 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 507 | { |
| 508 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 509 | } |
| 510 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 511 | bool LayerSupportBase::IsQLstmSupported(const TensorInfo&, // input |
| 512 | const TensorInfo&, // previousOutputIn |
| 513 | const TensorInfo&, // previousCellStateIn |
| 514 | const TensorInfo&, // outputStateOut |
| 515 | const TensorInfo&, // cellStateOut |
| 516 | const TensorInfo&, // output |
| 517 | const QLstmDescriptor&, // descriptor |
| 518 | const LstmInputParamsInfo&, // paramsInfo |
James Conroy | 586a9aa | 2020-03-20 08:49:33 +0000 | [diff] [blame] | 519 | Optional<std::string&> reasonIfUnsupported) const |
| 520 | { |
| 521 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 522 | } |
| 523 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 524 | bool LayerSupportBase::IsQuantizedLstmSupported(const TensorInfo&, // input |
| 525 | const TensorInfo&, // previousCellStateIn |
| 526 | const TensorInfo&, // previousOutputIn |
| 527 | const TensorInfo&, // cellStateOut |
| 528 | const TensorInfo&, // output |
| 529 | const QuantizedLstmInputParamsInfo&, // paramsInfo |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 530 | Optional<std::string&> reasonIfUnsupported) const |
| 531 | { |
| 532 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 533 | } |
| 534 | |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 535 | bool LayerSupportBase::IsRankSupported(const TensorInfo&, // input |
| 536 | const TensorInfo&, // output |
| 537 | Optional<std::string&> reasonIfUnsupported) const |
| 538 | { |
| 539 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 540 | } |
| 541 | |
Sadik Armagan | 0c3ea5b | 2021-02-03 09:29:30 +0000 | [diff] [blame] | 542 | bool LayerSupportBase::IsReduceSupported(const TensorInfo& /*input*/, |
| 543 | const TensorInfo& /*output*/, |
| 544 | const ReduceDescriptor& /*descriptor*/, |
| 545 | Optional<std::string&> reasonIfUnsupported) const |
| 546 | { |
| 547 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 548 | } |
| 549 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 550 | bool LayerSupportBase::IsReshapeSupported(const TensorInfo&, // input |
| 551 | const TensorInfo&, // output |
| 552 | const ReshapeDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 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::IsResizeSupported(const TensorInfo&, // input |
| 559 | const TensorInfo&, // output |
| 560 | const ResizeDescriptor&, // descriptor |
Teresa Charlin | a9075df | 2019-06-27 15:41:57 +0100 | [diff] [blame] | 561 | Optional<std::string&> reasonIfUnsupported) const |
| 562 | { |
| 563 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 564 | } |
| 565 | |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 566 | bool LayerSupportBase::IsShapeSupported(const TensorInfo&, // input |
| 567 | const TensorInfo&, // output |
| 568 | Optional<std::string&> reasonIfUnsupported) const |
| 569 | { |
| 570 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 571 | } |
| 572 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 573 | bool LayerSupportBase::IsSliceSupported(const TensorInfo&, // input |
| 574 | const TensorInfo&, // output |
| 575 | const SliceDescriptor&, // descriptor |
Aron Virginas-Tar | 636ab40 | 2019-09-16 14:27:45 +0100 | [diff] [blame] | 576 | Optional<std::string&> reasonIfUnsupported) const |
| 577 | { |
| 578 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 579 | } |
| 580 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 581 | bool LayerSupportBase::IsSoftmaxSupported(const TensorInfo&, // input |
| 582 | const TensorInfo&, // output |
| 583 | const SoftmaxDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 584 | Optional<std::string&> reasonIfUnsupported) const |
| 585 | { |
| 586 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 587 | } |
Derek Lamberti | 901ea11 | 2019-12-10 22:07:09 +0000 | [diff] [blame] | 588 | /**/ |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 589 | bool LayerSupportBase::IsSpaceToBatchNdSupported(const TensorInfo&, // input |
| 590 | const TensorInfo&, // output |
| 591 | const SpaceToBatchNdDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 592 | Optional<std::string&> reasonIfUnsupported) const |
| 593 | { |
| 594 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 595 | } |
| 596 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 597 | bool LayerSupportBase::IsSpaceToDepthSupported(const TensorInfo&, // input |
| 598 | const TensorInfo&, // output |
| 599 | const SpaceToDepthDescriptor&, // descriptor |
Aron Virginas-Tar | 972af15 | 2019-06-11 14:14:03 +0100 | [diff] [blame] | 600 | Optional<std::string&> reasonIfUnsupported) const |
| 601 | { |
| 602 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 603 | } |
| 604 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 605 | bool LayerSupportBase::IsSplitterSupported(const TensorInfo&, // input |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 606 | const std::vector<std::reference_wrapper<TensorInfo>>&, // outputs |
| 607 | const ViewsDescriptor&, // descriptor |
Narumol Prangnawarat | 15eb583 | 2019-05-20 15:31:05 +0100 | [diff] [blame] | 608 | Optional<std::string&> reasonIfUnsupported) const |
| 609 | { |
| 610 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 611 | } |
| 612 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 613 | bool LayerSupportBase::IsStackSupported(const std::vector<const TensorInfo*>&, // inputs |
| 614 | const TensorInfo&, // output |
| 615 | const StackDescriptor&, // descriptor |
Matthew Jackson | 2b8c1da | 2019-07-04 14:59:16 +0100 | [diff] [blame] | 616 | Optional<std::string&> reasonIfUnsupported) const |
| 617 | { |
| 618 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 619 | } |
| 620 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 621 | bool LayerSupportBase::IsStandInSupported(const std::vector<const TensorInfo*>&, // inputs |
| 622 | const std::vector<const TensorInfo*>&, // outputs |
| 623 | const StandInDescriptor&, // descriptor |
Derek Lamberti | 013c390 | 2019-10-21 10:46:16 +0100 | [diff] [blame] | 624 | Optional<std::string&> reasonIfUnsupported) const |
| 625 | { |
| 626 | if (reasonIfUnsupported) |
| 627 | { |
| 628 | std::stringstream message; |
| 629 | message << "StandIn layer is not executable via backends"; |
| 630 | |
| 631 | reasonIfUnsupported.value() = message.str(); |
| 632 | } |
| 633 | |
| 634 | return false; |
| 635 | } |
| 636 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 637 | bool LayerSupportBase::IsStridedSliceSupported(const TensorInfo&, // input |
| 638 | const TensorInfo&, // output |
| 639 | const StridedSliceDescriptor&, // descriptor |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 640 | Optional<std::string&> reasonIfUnsupported) const |
| 641 | { |
| 642 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 643 | } |
| 644 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 645 | bool LayerSupportBase::IsSubtractionSupported(const TensorInfo&, // input0 |
| 646 | const TensorInfo&, // input1 |
| 647 | const TensorInfo&, // output |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 648 | Optional<std::string&> reasonIfUnsupported) const |
| 649 | { |
| 650 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 651 | } |
| 652 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 653 | bool LayerSupportBase::IsSwitchSupported(const TensorInfo&, // input0 |
| 654 | const TensorInfo&, // input1 |
| 655 | const TensorInfo&, // output0 |
| 656 | const TensorInfo&, // output1 |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 657 | Optional<std::string&> reasonIfUnsupported) const |
| 658 | { |
| 659 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 660 | } |
| 661 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 662 | bool LayerSupportBase::IsTransposeConvolution2dSupported(const TensorInfo&, // input |
| 663 | const TensorInfo&, // output |
| 664 | const TransposeConvolution2dDescriptor&, // descriptor |
| 665 | const TensorInfo&, // weights |
| 666 | const Optional<TensorInfo>&, // biases |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 667 | Optional<std::string&> reasonIfUnsupported) const |
| 668 | { |
| 669 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 670 | } |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 671 | |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 672 | bool LayerSupportBase::IsTransposeSupported(const TensorInfo&, // input |
| 673 | const TensorInfo&, // output |
| 674 | const TransposeDescriptor&, // descriptor |
Mike Kelly | c9ea45a | 2020-02-28 18:11:58 +0000 | [diff] [blame] | 675 | Optional<std::string&> reasonIfUnsupported) const |
| 676 | { |
| 677 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 678 | } |
| 679 | |
Narumol Prangnawarat | 8ed39ae | 2021-07-15 16:16:25 +0100 | [diff] [blame] | 680 | bool LayerSupportBase::IsUnidirectionalSequenceLstmSupported(const TensorInfo&, // input |
| 681 | const TensorInfo&, // outputStateIn |
| 682 | const TensorInfo&, // cellStateIn |
| 683 | const TensorInfo&, // output |
| 684 | const Optional<TensorInfo>&, // hiddenStateOut |
| 685 | const Optional<TensorInfo>&, // cellStateOut |
| 686 | const LstmDescriptor&, // descriptor |
| 687 | const LstmInputParamsInfo&, // paramsInfo |
| 688 | Optional<std::string&> reasonIfUnsupported) const |
| 689 | { |
| 690 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 691 | } |
| 692 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 693 | } // namespace armnn |