Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "LayerSupportBase.hpp" |
| 7 | |
| 8 | #include <armnn/Exceptions.hpp> |
| 9 | |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 10 | #include <boost/core/ignore_unused.hpp> |
| 11 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 12 | namespace |
| 13 | { |
| 14 | |
| 15 | bool DefaultLayerSupport(const char* func, |
| 16 | const char* file, |
| 17 | unsigned int line, |
| 18 | armnn::Optional<std::string&> reasonIfUnsupported) |
| 19 | { |
| 20 | // NOTE: We only need to return the reason if the optional parameter is not empty |
| 21 | if (reasonIfUnsupported) |
| 22 | { |
| 23 | std::stringstream message; |
| 24 | message << func << " is not implemented [" << file << ":" << line << "]"; |
| 25 | |
| 26 | reasonIfUnsupported.value() = message.str(); |
| 27 | } |
| 28 | |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | } // anonymous namespace |
| 33 | |
| 34 | namespace armnn |
| 35 | { |
| 36 | |
| 37 | bool LayerSupportBase::IsActivationSupported(const TensorInfo& input, |
| 38 | const TensorInfo& output, |
| 39 | const ActivationDescriptor& descriptor, |
| 40 | Optional<std::string&> reasonIfUnsupported) const |
| 41 | { |
| 42 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 43 | } |
| 44 | |
| 45 | bool LayerSupportBase::IsAdditionSupported(const TensorInfo& input0, |
| 46 | const TensorInfo& input1, |
| 47 | const TensorInfo& output, |
| 48 | Optional<std::string&> reasonIfUnsupported) const |
| 49 | { |
| 50 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 51 | } |
| 52 | |
| 53 | bool LayerSupportBase::IsBatchNormalizationSupported(const TensorInfo& input, |
| 54 | const TensorInfo& output, |
| 55 | const TensorInfo& mean, |
| 56 | const TensorInfo& var, |
| 57 | const TensorInfo& beta, |
| 58 | const TensorInfo& gamma, |
| 59 | const BatchNormalizationDescriptor& descriptor, |
| 60 | Optional<std::string&> reasonIfUnsupported) const |
| 61 | { |
| 62 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 63 | } |
| 64 | |
| 65 | bool LayerSupportBase::IsBatchToSpaceNdSupported(const TensorInfo& input, |
| 66 | const TensorInfo& output, |
| 67 | const BatchToSpaceNdDescriptor& descriptor, |
| 68 | Optional<std::string&> reasonIfUnsupported) const |
| 69 | { |
| 70 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 71 | } |
| 72 | |
Jim Flynn | 906f946 | 2019-05-10 13:55:21 +0100 | [diff] [blame] | 73 | bool LayerSupportBase::IsConcatSupported(const std::vector<const TensorInfo*> inputs, |
| 74 | const TensorInfo& output, |
| 75 | const OriginsDescriptor& descriptor, |
| 76 | Optional<std::string&> reasonIfUnsupported) const |
| 77 | { |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 78 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
Jim Flynn | 906f946 | 2019-05-10 13:55:21 +0100 | [diff] [blame] | 79 | } |
| 80 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 81 | bool LayerSupportBase::IsConstantSupported(const TensorInfo& output, |
| 82 | Optional<std::string&> reasonIfUnsupported) const |
| 83 | { |
| 84 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 85 | } |
| 86 | |
| 87 | bool LayerSupportBase::IsConvertFp16ToFp32Supported(const TensorInfo& input, |
| 88 | const TensorInfo& output, |
| 89 | Optional<std::string&> reasonIfUnsupported) const |
| 90 | { |
| 91 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 92 | } |
| 93 | |
| 94 | bool LayerSupportBase::IsConvertFp32ToFp16Supported(const TensorInfo& input, |
| 95 | const TensorInfo& output, |
| 96 | Optional<std::string&> reasonIfUnsupported) const |
| 97 | { |
| 98 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 99 | } |
| 100 | |
| 101 | bool LayerSupportBase::IsConvolution2dSupported(const TensorInfo& input, |
| 102 | const TensorInfo& output, |
| 103 | const Convolution2dDescriptor& descriptor, |
| 104 | const TensorInfo& weights, |
| 105 | const Optional<TensorInfo>& biases, |
| 106 | Optional<std::string&> reasonIfUnsupported) const |
| 107 | { |
| 108 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 109 | } |
| 110 | |
| 111 | bool LayerSupportBase::IsDebugSupported(const TensorInfo& input, |
| 112 | const TensorInfo& output, |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 113 | Optional<std::string&> reasonIfUnsupported) const |
| 114 | { |
| 115 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 116 | } |
| 117 | |
| 118 | bool LayerSupportBase::IsDepthwiseConvolutionSupported(const TensorInfo& input, |
| 119 | const TensorInfo& output, |
| 120 | const DepthwiseConvolution2dDescriptor& descriptor, |
| 121 | const TensorInfo& weights, |
| 122 | const Optional<TensorInfo>& biases, |
| 123 | Optional<std::string&> reasonIfUnsupported) const |
| 124 | { |
| 125 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 126 | } |
| 127 | |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 128 | bool LayerSupportBase::IsDequantizeSupported(const TensorInfo& input, |
| 129 | const TensorInfo& output, |
| 130 | Optional<std::string&> reasonIfUnsupported) const |
| 131 | { |
| 132 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 133 | } |
| 134 | |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 135 | bool LayerSupportBase::IsDetectionPostProcessSupported(const armnn::TensorInfo& input0, |
| 136 | const armnn::TensorInfo& input1, |
| 137 | const armnn::DetectionPostProcessDescriptor& descriptor, |
| 138 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 139 | { |
| 140 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 141 | } |
| 142 | |
Matteo Martincigh | eac246d | 2019-05-14 09:11:03 +0100 | [diff] [blame] | 143 | bool LayerSupportBase::IsDilatedDepthwiseConvolutionSupported(const TensorInfo& input, |
| 144 | const TensorInfo& output, |
| 145 | const DepthwiseConvolution2dDescriptor& descriptor, |
| 146 | const TensorInfo& weights, |
| 147 | const Optional<TensorInfo>& biases, |
| 148 | Optional<std::string&> reasonIfUnsupported) const |
| 149 | { |
| 150 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 151 | } |
| 152 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 153 | bool LayerSupportBase::IsDivisionSupported(const TensorInfo& input0, |
| 154 | const TensorInfo& input1, |
| 155 | const TensorInfo& output, |
| 156 | Optional<std::string&> reasonIfUnsupported) const |
| 157 | { |
| 158 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 159 | } |
| 160 | |
| 161 | bool LayerSupportBase::IsEqualSupported(const armnn::TensorInfo& input0, |
| 162 | const armnn::TensorInfo& input1, |
| 163 | const armnn::TensorInfo& output, |
| 164 | armnn::Optional<std::string &> reasonIfUnsupported) const |
| 165 | { |
| 166 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 167 | } |
| 168 | |
| 169 | bool LayerSupportBase::IsFakeQuantizationSupported(const TensorInfo& input, |
| 170 | const FakeQuantizationDescriptor& descriptor, |
| 171 | Optional<std::string&> reasonIfUnsupported) const |
| 172 | { |
| 173 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 174 | } |
| 175 | |
| 176 | bool LayerSupportBase::IsFloorSupported(const TensorInfo& input, |
| 177 | const TensorInfo& output, |
| 178 | Optional<std::string&> reasonIfUnsupported) const |
| 179 | { |
| 180 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 181 | } |
| 182 | |
| 183 | bool LayerSupportBase::IsFullyConnectedSupported(const TensorInfo& input, |
| 184 | const TensorInfo& output, |
| 185 | const TensorInfo& weights, |
| 186 | const TensorInfo& biases, |
| 187 | const FullyConnectedDescriptor& descriptor, |
| 188 | Optional<std::string&> reasonIfUnsupported) const |
| 189 | { |
| 190 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 191 | } |
| 192 | |
narpra01 | b89b05f | 2019-01-16 09:53:09 +0000 | [diff] [blame] | 193 | bool LayerSupportBase::IsGatherSupported(const armnn::TensorInfo& input0, |
| 194 | const armnn::TensorInfo& input1, |
| 195 | const armnn::TensorInfo& output, |
| 196 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 197 | { |
| 198 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 199 | } |
| 200 | |
Matteo Martincigh | 3d6898c | 2019-01-15 16:11:44 +0000 | [diff] [blame] | 201 | bool LayerSupportBase::IsGreaterSupported(const TensorInfo& input0, |
| 202 | const TensorInfo& input1, |
| 203 | const TensorInfo& output, |
| 204 | Optional<std::string&> reasonIfUnsupported) const |
| 205 | { |
| 206 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 207 | } |
| 208 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 209 | bool LayerSupportBase::IsInputSupported(const TensorInfo& input, |
| 210 | Optional<std::string&> reasonIfUnsupported) const |
| 211 | { |
| 212 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 213 | } |
| 214 | |
| 215 | bool LayerSupportBase::IsL2NormalizationSupported(const TensorInfo& input, |
| 216 | const TensorInfo& output, |
| 217 | const L2NormalizationDescriptor& descriptor, |
| 218 | Optional<std::string&> reasonIfUnsupported) const |
| 219 | { |
| 220 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 221 | } |
| 222 | |
| 223 | bool LayerSupportBase::IsLstmSupported(const TensorInfo& input, |
| 224 | const TensorInfo& outputStateIn, |
| 225 | const TensorInfo& cellStateIn, |
| 226 | const TensorInfo& scratchBuffer, |
| 227 | const TensorInfo& outputStateOut, |
| 228 | const TensorInfo& cellStateOut, |
| 229 | const TensorInfo& output, |
| 230 | const LstmDescriptor& descriptor, |
Jan Eilers | d01a83c | 2019-07-03 18:20:40 +0100 | [diff] [blame] | 231 | const LstmInputParamsInfo& paramsInfo, |
| 232 | Optional<std::string&> reasonIfUnsupported) const |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 233 | { |
| 234 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 235 | } |
| 236 | |
| 237 | bool LayerSupportBase::IsMaximumSupported(const TensorInfo& input0, |
| 238 | const TensorInfo& input1, |
| 239 | const TensorInfo& output, |
| 240 | Optional<std::string&> reasonIfUnsupported) const |
| 241 | { |
| 242 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 243 | } |
| 244 | |
| 245 | bool LayerSupportBase::IsMeanSupported(const TensorInfo& input, |
| 246 | const TensorInfo& output, |
| 247 | const MeanDescriptor& descriptor, |
| 248 | Optional<std::string&> reasonIfUnsupported) const |
| 249 | { |
| 250 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 251 | } |
| 252 | |
| 253 | bool LayerSupportBase::IsMemCopySupported(const armnn::TensorInfo& input, |
| 254 | const armnn::TensorInfo& output, |
| 255 | armnn::Optional<std::string &> reasonIfUnsupported) const |
| 256 | { |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 257 | boost::ignore_unused(input); |
| 258 | boost::ignore_unused(output); |
| 259 | return true; |
| 260 | } |
| 261 | |
| 262 | bool LayerSupportBase::IsMemImportSupported(const armnn::TensorInfo& input, |
| 263 | const armnn::TensorInfo& output, |
| 264 | armnn::Optional<std::string &> reasonIfUnsupported) const |
| 265 | { |
| 266 | boost::ignore_unused(input); |
| 267 | boost::ignore_unused(output); |
| 268 | return true; |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 269 | } |
| 270 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 271 | bool LayerSupportBase::IsMergeSupported(const TensorInfo& input0, |
| 272 | const TensorInfo& input1, |
| 273 | const TensorInfo& output, |
| 274 | Optional<std::string&> reasonIfUnsupported) const |
| 275 | { |
| 276 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 277 | } |
| 278 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 279 | bool LayerSupportBase::IsMergerSupported(const std::vector<const TensorInfo*> inputs, |
| 280 | const TensorInfo& output, |
| 281 | const OriginsDescriptor& descriptor, |
| 282 | Optional<std::string&> reasonIfUnsupported) const |
| 283 | { |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 284 | return IsConcatSupported(inputs, output, descriptor, reasonIfUnsupported); |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 285 | } |
| 286 | |
| 287 | bool LayerSupportBase::IsMinimumSupported(const TensorInfo& input0, |
| 288 | const TensorInfo& input1, |
| 289 | const TensorInfo& output, |
| 290 | Optional<std::string&> reasonIfUnsupported) const |
| 291 | { |
| 292 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 293 | } |
| 294 | |
| 295 | bool LayerSupportBase::IsMultiplicationSupported(const TensorInfo& input0, |
| 296 | const TensorInfo& input1, |
| 297 | const TensorInfo& output, |
| 298 | Optional<std::string&> reasonIfUnsupported) const |
| 299 | { |
| 300 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 301 | } |
| 302 | |
| 303 | bool LayerSupportBase::IsNormalizationSupported(const TensorInfo& input, |
| 304 | const TensorInfo& output, |
| 305 | const NormalizationDescriptor& descriptor, |
| 306 | Optional<std::string&> reasonIfUnsupported) const |
| 307 | { |
| 308 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 309 | } |
| 310 | |
| 311 | bool LayerSupportBase::IsOutputSupported(const TensorInfo& output, |
| 312 | Optional<std::string&> reasonIfUnsupported) const |
| 313 | { |
| 314 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 315 | } |
| 316 | |
| 317 | bool LayerSupportBase::IsPadSupported(const TensorInfo& input, |
| 318 | const TensorInfo& output, |
| 319 | const PadDescriptor& descriptor, |
| 320 | Optional<std::string&> reasonIfUnsupported) const |
| 321 | { |
| 322 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 323 | } |
| 324 | |
| 325 | bool LayerSupportBase::IsPermuteSupported(const TensorInfo& input, |
| 326 | const TensorInfo& output, |
| 327 | const PermuteDescriptor& descriptor, |
| 328 | Optional<std::string&> reasonIfUnsupported) const |
| 329 | { |
| 330 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 331 | } |
| 332 | |
| 333 | bool LayerSupportBase::IsPooling2dSupported(const TensorInfo& input, |
| 334 | const TensorInfo& output, |
| 335 | const Pooling2dDescriptor& descriptor, |
| 336 | Optional<std::string&> reasonIfUnsupported) const |
| 337 | { |
| 338 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 339 | } |
| 340 | |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 341 | bool LayerSupportBase::IsPreCompiledSupported(const TensorInfo& input, |
| 342 | const PreCompiledDescriptor& descriptor, |
| 343 | Optional<std::string&> reasonIfUnsupported) const |
| 344 | { |
| 345 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 346 | } |
| 347 | |
Matteo Martincigh | 0e406ee | 2019-06-12 15:42:18 +0100 | [diff] [blame] | 348 | bool LayerSupportBase::IsPreluSupported(const TensorInfo& input, |
| 349 | const TensorInfo& alpha, |
| 350 | const TensorInfo& output, |
| 351 | Optional<std::string &> reasonIfUnsupported) const |
| 352 | { |
| 353 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 354 | } |
| 355 | |
Derek Lamberti | a9cca6a | 2019-03-25 15:41:58 +0000 | [diff] [blame] | 356 | bool LayerSupportBase::IsQuantizeSupported(const armnn::TensorInfo& input, |
| 357 | const armnn::TensorInfo& output, |
| 358 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 359 | { |
| 360 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 361 | } |
| 362 | |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 363 | bool LayerSupportBase::IsQuantizedLstmSupported(const TensorInfo& input, |
| 364 | const TensorInfo& previousCellStateIn, |
| 365 | const TensorInfo& previousOutputIn, |
| 366 | const TensorInfo& cellStateOut, |
| 367 | const TensorInfo& output, |
| 368 | const QuantizedLstmInputParamsInfo& paramsInfo, |
| 369 | Optional<std::string&> reasonIfUnsupported) const |
| 370 | { |
| 371 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 372 | } |
| 373 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 374 | bool LayerSupportBase::IsReshapeSupported(const TensorInfo& input, |
| 375 | const ReshapeDescriptor& descriptor, |
| 376 | Optional<std::string&> reasonIfUnsupported) const |
| 377 | { |
| 378 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 379 | } |
| 380 | |
| 381 | bool LayerSupportBase::IsResizeBilinearSupported(const TensorInfo& input, |
Sadik Armagan | c625f00 | 2018-12-17 11:32:16 +0000 | [diff] [blame] | 382 | const TensorInfo& output, |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 383 | Optional<std::string&> reasonIfUnsupported) const |
| 384 | { |
| 385 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 386 | } |
| 387 | |
Teresa Charlin | a9075df | 2019-06-27 15:41:57 +0100 | [diff] [blame] | 388 | bool LayerSupportBase::IsResizeSupported(const TensorInfo& input, |
| 389 | const TensorInfo& output, |
| 390 | const ResizeDescriptor& descriptor, |
| 391 | Optional<std::string&> reasonIfUnsupported) const |
| 392 | { |
| 393 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 394 | } |
| 395 | |
Matteo Martincigh | 3d6898c | 2019-01-15 16:11:44 +0000 | [diff] [blame] | 396 | bool LayerSupportBase::IsRsqrtSupported(const TensorInfo &input, |
| 397 | const TensorInfo &output, |
| 398 | Optional<std::string &> reasonIfUnsupported) const |
| 399 | { |
| 400 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 401 | } |
| 402 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 403 | bool LayerSupportBase::IsSoftmaxSupported(const TensorInfo& input, |
| 404 | const TensorInfo& output, |
| 405 | const SoftmaxDescriptor& descriptor, |
| 406 | Optional<std::string&> reasonIfUnsupported) const |
| 407 | { |
| 408 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 409 | } |
| 410 | |
| 411 | bool LayerSupportBase::IsSpaceToBatchNdSupported(const TensorInfo& input, |
| 412 | const TensorInfo& output, |
| 413 | const SpaceToBatchNdDescriptor& descriptor, |
| 414 | Optional<std::string&> reasonIfUnsupported) const |
| 415 | { |
| 416 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 417 | } |
| 418 | |
Aron Virginas-Tar | 972af15 | 2019-06-11 14:14:03 +0100 | [diff] [blame] | 419 | bool LayerSupportBase::IsSpaceToDepthSupported(const TensorInfo& input, |
| 420 | const TensorInfo& output, |
| 421 | const SpaceToDepthDescriptor& descriptor, |
| 422 | Optional<std::string&> reasonIfUnsupported) const |
| 423 | { |
| 424 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 425 | } |
| 426 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 427 | bool LayerSupportBase::IsSplitterSupported(const TensorInfo& input, |
| 428 | const ViewsDescriptor& descriptor, |
| 429 | Optional<std::string&> reasonIfUnsupported) const |
| 430 | { |
| 431 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 432 | } |
| 433 | |
Narumol Prangnawarat | 15eb583 | 2019-05-20 15:31:05 +0100 | [diff] [blame] | 434 | bool LayerSupportBase::IsSplitterSupported(const TensorInfo& input, |
| 435 | const std::vector<std::reference_wrapper<TensorInfo>>& outputs, |
| 436 | const ViewsDescriptor& descriptor, |
| 437 | Optional<std::string&> reasonIfUnsupported) const |
| 438 | { |
| 439 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 440 | } |
| 441 | |
Matthew Jackson | 81e601c | 2019-07-11 12:07:09 +0100 | [diff] [blame] | 442 | bool LayerSupportBase::IsStackSupported(const std::vector<const TensorInfo*>& inputs, |
Matthew Jackson | 2b8c1da | 2019-07-04 14:59:16 +0100 | [diff] [blame] | 443 | const TensorInfo& output, |
| 444 | const StackDescriptor& descriptor, |
| 445 | Optional<std::string&> reasonIfUnsupported) const |
| 446 | { |
| 447 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 448 | } |
| 449 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 450 | bool LayerSupportBase::IsStridedSliceSupported(const TensorInfo& input, |
| 451 | const TensorInfo& output, |
| 452 | const StridedSliceDescriptor& descriptor, |
| 453 | Optional<std::string&> reasonIfUnsupported) const |
| 454 | { |
| 455 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 456 | } |
| 457 | |
| 458 | bool LayerSupportBase::IsSubtractionSupported(const TensorInfo& input0, |
| 459 | const TensorInfo& input1, |
| 460 | const TensorInfo& output, |
| 461 | Optional<std::string&> reasonIfUnsupported) const |
| 462 | { |
| 463 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 464 | } |
| 465 | |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 466 | bool LayerSupportBase::IsSwitchSupported(const TensorInfo& input0, |
| 467 | const TensorInfo& input1, |
| 468 | const TensorInfo& output0, |
| 469 | const TensorInfo& output1, |
| 470 | Optional<std::string&> reasonIfUnsupported) const |
| 471 | { |
| 472 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 473 | } |
| 474 | |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 475 | bool LayerSupportBase::IsTransposeConvolution2dSupported(const TensorInfo& input, |
| 476 | const TensorInfo& output, |
| 477 | const TransposeConvolution2dDescriptor& descriptor, |
| 478 | const TensorInfo& weights, |
| 479 | const Optional<TensorInfo>& biases, |
| 480 | Optional<std::string&> reasonIfUnsupported) const |
| 481 | { |
| 482 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 483 | } |
| 484 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 485 | } // namespace armnn |