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