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