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, |
| 246 | Optional<std::string&> reasonIfUnsupported) const |
| 247 | { |
| 248 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 249 | } |
| 250 | |
| 251 | bool LayerSupportBase::IsMaximumSupported(const TensorInfo& input0, |
| 252 | const TensorInfo& input1, |
| 253 | const TensorInfo& output, |
| 254 | Optional<std::string&> reasonIfUnsupported) const |
| 255 | { |
| 256 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 257 | } |
| 258 | |
| 259 | bool LayerSupportBase::IsMeanSupported(const TensorInfo& input, |
| 260 | const TensorInfo& output, |
| 261 | const MeanDescriptor& descriptor, |
| 262 | Optional<std::string&> reasonIfUnsupported) const |
| 263 | { |
| 264 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 265 | } |
| 266 | |
| 267 | bool LayerSupportBase::IsMemCopySupported(const armnn::TensorInfo& input, |
| 268 | const armnn::TensorInfo& output, |
| 269 | armnn::Optional<std::string &> reasonIfUnsupported) const |
| 270 | { |
| 271 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 272 | } |
| 273 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 274 | bool LayerSupportBase::IsMergeSupported(const TensorInfo& input0, |
| 275 | const TensorInfo& input1, |
| 276 | const TensorInfo& output, |
| 277 | Optional<std::string&> reasonIfUnsupported) const |
| 278 | { |
| 279 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 280 | } |
| 281 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 282 | bool LayerSupportBase::IsMergerSupported(const std::vector<const TensorInfo*> inputs, |
| 283 | const TensorInfo& output, |
| 284 | const OriginsDescriptor& descriptor, |
| 285 | Optional<std::string&> reasonIfUnsupported) const |
| 286 | { |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 287 | return IsConcatSupported(inputs, output, descriptor, reasonIfUnsupported); |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | bool LayerSupportBase::IsMinimumSupported(const TensorInfo& input0, |
| 291 | const TensorInfo& input1, |
| 292 | const TensorInfo& output, |
| 293 | Optional<std::string&> reasonIfUnsupported) const |
| 294 | { |
| 295 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 296 | } |
| 297 | |
| 298 | bool LayerSupportBase::IsMultiplicationSupported(const TensorInfo& input0, |
| 299 | const TensorInfo& input1, |
| 300 | const TensorInfo& output, |
| 301 | Optional<std::string&> reasonIfUnsupported) const |
| 302 | { |
| 303 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 304 | } |
| 305 | |
| 306 | bool LayerSupportBase::IsNormalizationSupported(const TensorInfo& input, |
| 307 | const TensorInfo& output, |
| 308 | const NormalizationDescriptor& descriptor, |
| 309 | Optional<std::string&> reasonIfUnsupported) const |
| 310 | { |
| 311 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 312 | } |
| 313 | |
| 314 | bool LayerSupportBase::IsOutputSupported(const TensorInfo& output, |
| 315 | Optional<std::string&> reasonIfUnsupported) const |
| 316 | { |
| 317 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 318 | } |
| 319 | |
| 320 | bool LayerSupportBase::IsPadSupported(const TensorInfo& input, |
| 321 | const TensorInfo& output, |
| 322 | const PadDescriptor& descriptor, |
| 323 | Optional<std::string&> reasonIfUnsupported) const |
| 324 | { |
| 325 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 326 | } |
| 327 | |
| 328 | bool LayerSupportBase::IsPermuteSupported(const TensorInfo& input, |
| 329 | const TensorInfo& output, |
| 330 | const PermuteDescriptor& descriptor, |
| 331 | Optional<std::string&> reasonIfUnsupported) const |
| 332 | { |
| 333 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 334 | } |
| 335 | |
| 336 | bool LayerSupportBase::IsPooling2dSupported(const TensorInfo& input, |
| 337 | const TensorInfo& output, |
| 338 | const Pooling2dDescriptor& descriptor, |
| 339 | Optional<std::string&> reasonIfUnsupported) const |
| 340 | { |
| 341 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 342 | } |
| 343 | |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 344 | bool LayerSupportBase::IsPreCompiledSupported(const TensorInfo& input, |
| 345 | const PreCompiledDescriptor& descriptor, |
| 346 | Optional<std::string&> reasonIfUnsupported) const |
| 347 | { |
| 348 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 349 | } |
| 350 | |
Matteo Martincigh | 0e406ee | 2019-06-12 15:42:18 +0100 | [diff] [blame] | 351 | bool LayerSupportBase::IsPreluSupported(const TensorInfo& input, |
| 352 | const TensorInfo& alpha, |
| 353 | const TensorInfo& output, |
| 354 | Optional<std::string &> reasonIfUnsupported) const |
| 355 | { |
| 356 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 357 | } |
| 358 | |
Derek Lamberti | a9cca6a | 2019-03-25 15:41:58 +0000 | [diff] [blame] | 359 | bool LayerSupportBase::IsQuantizeSupported(const armnn::TensorInfo& input, |
| 360 | const armnn::TensorInfo& output, |
| 361 | armnn::Optional<std::string&> reasonIfUnsupported) const |
| 362 | { |
| 363 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 364 | } |
| 365 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 366 | bool LayerSupportBase::IsReshapeSupported(const TensorInfo& input, |
| 367 | const ReshapeDescriptor& descriptor, |
| 368 | Optional<std::string&> reasonIfUnsupported) const |
| 369 | { |
| 370 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 371 | } |
| 372 | |
| 373 | bool LayerSupportBase::IsResizeBilinearSupported(const TensorInfo& input, |
Sadik Armagan | c625f00 | 2018-12-17 11:32:16 +0000 | [diff] [blame] | 374 | const TensorInfo& output, |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 375 | Optional<std::string&> reasonIfUnsupported) const |
| 376 | { |
| 377 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 378 | } |
| 379 | |
Matteo Martincigh | 3d6898c | 2019-01-15 16:11:44 +0000 | [diff] [blame] | 380 | bool LayerSupportBase::IsRsqrtSupported(const TensorInfo &input, |
| 381 | const TensorInfo &output, |
| 382 | Optional<std::string &> reasonIfUnsupported) const |
| 383 | { |
| 384 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 385 | } |
| 386 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 387 | bool LayerSupportBase::IsSoftmaxSupported(const TensorInfo& input, |
| 388 | const TensorInfo& output, |
| 389 | const SoftmaxDescriptor& descriptor, |
| 390 | Optional<std::string&> reasonIfUnsupported) const |
| 391 | { |
| 392 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 393 | } |
| 394 | |
| 395 | bool LayerSupportBase::IsSpaceToBatchNdSupported(const TensorInfo& input, |
| 396 | const TensorInfo& output, |
| 397 | const SpaceToBatchNdDescriptor& descriptor, |
| 398 | Optional<std::string&> reasonIfUnsupported) const |
| 399 | { |
| 400 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 401 | } |
| 402 | |
Aron Virginas-Tar | 972af15 | 2019-06-11 14:14:03 +0100 | [diff] [blame] | 403 | bool LayerSupportBase::IsSpaceToDepthSupported(const TensorInfo& input, |
| 404 | const TensorInfo& output, |
| 405 | const SpaceToDepthDescriptor& descriptor, |
| 406 | Optional<std::string&> reasonIfUnsupported) const |
| 407 | { |
| 408 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 409 | } |
| 410 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 411 | bool LayerSupportBase::IsSplitterSupported(const TensorInfo& input, |
| 412 | const ViewsDescriptor& descriptor, |
| 413 | Optional<std::string&> reasonIfUnsupported) const |
| 414 | { |
| 415 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 416 | } |
| 417 | |
Narumol Prangnawarat | 15eb583 | 2019-05-20 15:31:05 +0100 | [diff] [blame] | 418 | bool LayerSupportBase::IsSplitterSupported(const TensorInfo& input, |
| 419 | const std::vector<std::reference_wrapper<TensorInfo>>& outputs, |
| 420 | const ViewsDescriptor& descriptor, |
| 421 | Optional<std::string&> reasonIfUnsupported) const |
| 422 | { |
| 423 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 424 | } |
| 425 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 426 | bool LayerSupportBase::IsStridedSliceSupported(const TensorInfo& input, |
| 427 | const TensorInfo& output, |
| 428 | const StridedSliceDescriptor& descriptor, |
| 429 | Optional<std::string&> reasonIfUnsupported) const |
| 430 | { |
| 431 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 432 | } |
| 433 | |
| 434 | bool LayerSupportBase::IsSubtractionSupported(const TensorInfo& input0, |
| 435 | const TensorInfo& input1, |
| 436 | const TensorInfo& output, |
| 437 | Optional<std::string&> reasonIfUnsupported) const |
| 438 | { |
| 439 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 440 | } |
| 441 | |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 442 | bool LayerSupportBase::IsSwitchSupported(const TensorInfo& input0, |
| 443 | const TensorInfo& input1, |
| 444 | const TensorInfo& output0, |
| 445 | const TensorInfo& output1, |
| 446 | Optional<std::string&> reasonIfUnsupported) const |
| 447 | { |
| 448 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 449 | } |
| 450 | |
Aron Virginas-Tar | 639fb04 | 2019-06-20 14:28:19 +0100 | [diff] [blame] | 451 | bool LayerSupportBase::IsTransposeConvolution2dSupported(const TensorInfo& input, |
| 452 | const TensorInfo& output, |
| 453 | const TransposeConvolution2dDescriptor& descriptor, |
| 454 | const TensorInfo& weights, |
| 455 | const Optional<TensorInfo>& biases, |
| 456 | Optional<std::string&> reasonIfUnsupported) const |
| 457 | { |
| 458 | return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported); |
| 459 | } |
| 460 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 461 | } // namespace armnn |